Replies: 1 comment
-
|
Hmm.. looking further into this, something ain't right here.. Seems like we do get the error but somehow it is muted elsewhere outside useMutation scope.. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We have a form that use optimistic updates with useMutation, where we use onError to roll back data in memory if it fails.
However onError seems to mute all errors, and does not rethrow them, which then breaks our forms that doesn't display any errors to the users, if there is a backend validation error.
The following code (from the top of my head) is basically what we are trying to accomplish (boiled down to bare minimum)
If onError is removed then the console.log in doSomething() is called..
Beta Was this translation helpful? Give feedback.
All reactions