kompassi
kompassi copied to clipboard
Handle GraphQL client errors gracefully in v2 frontend
When the GraphQL API call fails, there's no error handling in the frontend.
Queries
Query errors bubble up to the top level and cause an internal server error page to be shown.
- [ ] Add an error boundary that shows a custom error page.
- [ ] Handle
Unauthorized
from GraphQL separately so that it shows<SignInRequired />
.
Mutations
Mutation errors in server actions are silently ignored and nothing happens on the form trying to submit the mutation.
- [ ] Figure out a way to show the error to the user on the form whose submit action failed.