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

Propagate errors from Mapbox GL JS #62

Open
ryanbaumann opened this issue Mar 8, 2018 · 1 comment
Open

Propagate errors from Mapbox GL JS #62

ryanbaumann opened this issue Mar 8, 2018 · 1 comment
Milestone

Comments

@ryanbaumann
Copy link
Contributor

ryanbaumann commented Mar 8, 2018

Problem

The Mapbox GL JS library has tons of built-in error checking for tokens, styles, and sources. In order to provide relevant and useful error messages to a user creating a visualization, we'd have to re-create many error checks in the Python mapboxgl library.

Proposal

Propagate errors that affect the visualization (invalid token, invalid Mapbox style sheet, missing source, etc) and throw them from the python mapboxgl code execution. We wouldn't want to propagate all types of errors - only ones that prevent a valid data visualization layer from being drawn on the map, or from the map being initialized.

Reference PR by @EtienneDesticourt - #59 (comment)

@perrygeo @sgillies, any thoughts on this approach?

@ryanbaumann ryanbaumann changed the title Propagate errors from Mapbox GL JS Propagate errors from Mapbox GL JS to Python mapboxgl Mar 8, 2018
@ryanbaumann ryanbaumann changed the title Propagate errors from Mapbox GL JS to Python mapboxgl Propagate errors from Mapbox GL JS Mar 8, 2018
@sgillies
Copy link
Contributor

sgillies commented Mar 9, 2018

@ryanbaumann Sounds like a good idea to me. A Python exception is way better than map that never renders. I'm really interested in seeing how it would be done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants