Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poor failure modes for linked data #5

Closed
jjhembd opened this issue Jun 30, 2021 · 2 comments
Closed

Poor failure modes for linked data #5

jjhembd opened this issue Jun 30, 2021 · 2 comments

Comments

@jjhembd
Copy link
Collaborator

jjhembd commented Jun 30, 2021

HTTP 404 errors from linked data (such as URLs pointing to GeoJSON sources) are reported as simply "HTTP 404 Not Found". But what exactly wasn't found? The error looks just like the error for a bad link to the whole style document.

Also, we don't need to fail the whole document if only one of the sources is not accessible.

Test case: plug this link into the "validator" example:
https://globeletjs.org/examples/geojson/klokantech-basic-style-geojson.json

jjhembd added a commit that referenced this issue Jul 1, 2021
- read.js: Return Errors, and add the URL to the error message
- links.js: Refactor, and use Promise.allSettled instead of
  Promise.all for sources, so the style can continue loading
  even if one source fails. For the same reason, catch and log
  any errors from loading the sprite
- examples/validator: Add missingSprite.json for testing
@jjhembd
Copy link
Collaborator Author

jjhembd commented Jul 1, 2021

This should be resolved by 487a22d.

  • HTTP errors are logged along with the relevant URL
  • Errors from individual sources or the sprite are simply logged, allowing the rest of the style to continue loading
  • Error messages are more verbose

@jjhembd
Copy link
Collaborator Author

jjhembd commented Jul 1, 2021

Published as 0.4.2 in 826a829

@jjhembd jjhembd closed this as completed Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant