Summary
Error handling in React Query hooks is inconsistent across the codebase. Some hooks surface errors to the UI, others swallow them silently. Contributors need a documented pattern to follow when writing new hooks so error handling is consistent from the start.
Scope
- Document the standard error handling pattern: what to do in
onError, when to show a toast vs an inline error state, and when to let the error boundary catch it
- Add a note on how to distinguish network errors from API validation errors (4xx vs 5xx)
- Include a worked example of a hook that handles both error types correctly
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram
Summary
Error handling in React Query hooks is inconsistent across the codebase. Some hooks surface errors to the UI, others swallow them silently. Contributors need a documented pattern to follow when writing new hooks so error handling is consistent from the start.
Scope
onError, when to show a toast vs an inline error state, and when to let the error boundary catch itAcceptance Criteria
onErroris documentedETA: 12 hours
Coordinate on Telegram