You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
@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!
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?
The text was updated successfully, but these errors were encountered: