Skip to content

Internal errors aren't passed to an onError callback #205

@gadomski

Description

@gadomski

I'd like to give users feedback when a COGLayer fails to load, but it appears as though onError doesn't get hit for some errors. E.g. I've added this to my layer:

      new COGLayer({
        id: "cog-" + geotiffHref,
        geotiff: geotiffHref,
        onError: () => console.log("hi there"),
      })

Then, a request that loads the GeoTIFF at https://maxar-opendata.s3.amazonaws.com/events/afghanistan-earthquake22/ard/42/120200201013/2022-06-27/10300100D4928800-visual.tif fails with:

Image

No "hi there". I've dug a bit into deck.gl error handling, and haven't come with a solution that doesn't just implement a this.props.onError?.() manually. If that's the correct approach, happy to PR that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions