Closed SofianeDjellouli closed 2 years ago
I'm super sorry for the late reply.
How can useMutation errors be caught in ErrorBoundary by default? Would it be possible to use a custom config for the query client in order to have useErrorBoundary: true or other things?
Unfortunately, it looks like you have to explicitly pass useErrorBoundary
right now as there's no way to provide custom query client config.
This is covered by the Blitz Toolkit. Docs: https://alpha.blitzjs.com/docs/rpc-setup
What is the problem?
I'm trying to show a snackbar when an error is thrown in mutations in the
_app
component. The documentation says:However, the error boundary is not rendered by default when a mutation throws an error. It is render only if the
useErrorBoundary
mutation option is set totrue
inuseMutation
. The documentation onuseErrorBoundary
says:It seems to contradict the latter documentation quote.
useMutation
errors be caught inErrorBoundary
by default?useErrorBoundary: true
or other things?Thanks
Paste all your error logs here:
Paste all relevant code snippets here:
Custom App
Signup Page
What are detailed steps to reproduce this?
1.
Run
blitz -v
and paste the output here:Please include below any other applicable logs and screenshots that show your problem:
No response