starschema / mapboxgl-powerbi

Mapbox Visual for Power BI - High performance, custom map visuals for Power BI dashboards
https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA104381472?tab=Overview
MIT License
34 stars 9 forks source link

Provide error message on UI in case of 401 from API #18

Closed mate-turi closed 2 years ago

mate-turi commented 2 years ago

Describe the ideal solution or feature request

When a user uses a wrong API key (invalid, or mistyped) which has no access to the Mapbox service, there is no proper error message on the user interface. The visaul not loading properly, but the user will not be able to identify the reason of the issue.

image

From the console, the error message is clear:

image

In these cases, the visual should provide a detailed error message for the user on the UI:

"Unauthorized: you may have provided an invalid Mapbox access token. Please check if it is valid and active on the Mapbox - Acess tokens site."