Skip to content

Display validation errors on the dashboard

frontend issue for Validation and error handling for dashboard vis... (#396228 - closed)

Once the backend is returning validation errors on the GraphQL response, we can display these on the dashboard.

Implementation plan

  • modify panels_base.vue -> showErrorState to check for any errors on the given visualization prop
  • skip fetching data for the panel if errors exist
    • do not show retry button in this case
  • display errors inside the error state popover: (copy to confirm)
    • title: Invalid visualization configuration
    • body:
      • [bullet list of validation error messages]
      • Learn more about [chart visualizations](``https://docs.gitlab.com/ee/user/analytics/analytics_dashboards.html#define-a-chart-visualization``).
  • also display fetch related errors (for example when a visualization has a valid structure, but an invalid CubeJS measure/dimension)
    • when fetch returns an error, store the error.message (if it exists) on this.error, instead of a boolean
    • display the error inside the error state popover:
      • title: Failed to fetch data (this is what we have now)
      • body:
        • [error message]
  • test coverage
Edited by Elwyn Benson