-
Notifications
You must be signed in to change notification settings - Fork 15
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
Rd-324-2 #124
Rd-324-2 #124
Conversation
This PR comes as a replacement of #124 |
This version of the fix took longer than expected because of how Maplibre GL JS deals (or rather doesn't deal) with failed HTTP requests due to CORS error. As we can see here, the fetch call is is awaited but is not framed with a try/catch. In case of CORS error, such call would not return a valid Due to the error being generic (and not containing any info about the URL), there was a need to implement a second system just for detecting CORS errors: the whole logic with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a little bit of extra code, but it should not create any significant performance overhead and covers quite a lot of different cases that could happen.
👍
RD-324
Using a fallback style in case the provided one is at a URL that does not resolve.
Can be tested with the following: