fix(deck.gl-zarr): raise Zarr open failures through onError - #654
Closed
kylebarron wants to merge 1 commit into
Closed
kylebarron wants to merge 1 commit into
kylebarron wants to merge 1 commit into
Conversation
`updateState` discarded the `_parseZarr()` promise with `void`, so every failure it can produce was swallowed into an unhandled rejection: a mistyped `variable`, malformed GeoZarr attrs, unnamed array dimensions, an invalid `selection`, or a rejecting `epsgResolver`. The layer simply rendered nothing and the carefully written error messages never reached the app. Route those through `Layer.raiseError` so they surface via `onError`, mirroring the COG layers (#652). Rejection values are normalized before use, since a resolver rejecting with a non-Error would otherwise make `error.message` throw inside the catch handler and produce the same unhandled rejection this is meant to fix. Surfacing the errors needs a cancellation story that ZarrLayer lacked entirely, so add one: an AbortController in layer state, aborted by a new `finalizeState` and replaced on every re-parse. Without it, a layer unmounted mid-open would start raising errors the app can no longer act on. The same controller closes a pre-existing race where a slow earlier parse could resolve after a newer one and write its arrays and descriptor over the newer state. Nothing threads the signal into zarrita, so this guards state writes rather than cancelling reads. Also drops three `window.root`/`window.group`/`window.meta` debugging assignments that were shipping in the parse path. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
kylebarron
marked this pull request as draft
September 22, 2026 14:54
Member
Author
|
We do need to refactor Zarr parsing to emit errors through onError, but for now I just want to finally get the release out #638 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
updateStatediscarded the_parseZarr()promise withvoid, so every failure it can produce was swallowed into an unhandled rejection: a mistypedvariable, malformed GeoZarr attrs, unnamed array dimensions, an invalidselection, or a rejectingepsgResolver. The layer simply rendered nothing and the carefully written error messages never reached the app.Route those through
Layer.raiseErrorso they surface viaonError, mirroring the COG layers (#652). Rejection values are normalized before use, since a resolver rejecting with a non-Error would otherwise makeerror.messagethrow inside the catch handler and produce the same unhandled rejection this is meant to fix.Surfacing the errors needs a cancellation story that ZarrLayer lacked entirely, so add one: an AbortController in layer state, aborted by a new
finalizeStateand replaced on every re-parse. Without it, a layer unmounted mid-open would start raising errors the app can no longer act on. The same controller closes a pre-existing race where a slow earlier parse could resolve after a newer one and write its arrays and descriptor over the newer state. Nothing threads the signal into zarrita, so this guards state writes rather than cancelling reads.Also drops three
window.root/window.group/window.metadebugging assignments that were shipping in the parse path.What I am changing
How I did it
How you can test it
Related Issues