Analytics visualization designer should fail gracefully when cube data fails to load
Followup from: !114533 (comment 1322427885)+
Currently the visualization designer fails silently / not obviously when the CubeJS requests fail to load. If the meta
endpoint fails, the metrics
panel is completely hidden. If the load
endpoint fails when selecting a metric, the preview
panel sits in an infinite loading state.
Investigate error catching options from the cubejs-client which is dealing with data fetching, and show an obvious user-facing error when loading fails.
Implementation plan
- in analytics_visualization_designer hook into the cubejs
query-builder
componentqueryStatus
event to surface errors. - store error state
- when error exists, display a user facing error via GlAlert:
Analytics|An error occurred while loading data.
- when
queryStatus
fires again initiating another request, clear the error state - tests