React Query API error handling #157506
Labels
epic
Team: Actionable Observability - DEPRECATED
For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge"
📝 Summary
React Query expects errors from an http fetching library to be in a certain form. Kibana's
http
is not a returning its error in the form that React Query likes, leading it to be difficult to show API error reason messages returned from the API inside Toasts.An example of how it was implemented now is:
This utility can be improved, and should be implemented in all React Query hooks in the Observability app to have a uniform experience.
Originally posted by @kdelemme in #157488 (comment)
✅ Acceptance criteria
The text was updated successfully, but these errors were encountered: