You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say the error fails. Which onError do get called?
From what I understood, the hook-definition one, and the one directly called with mutate both get called. But what about the global one, does it still trigger?
And does this behaviour change when using mutateAsync, as that one throws errors?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Let's say I define three onError handlers:
When creating the queryClient:
Afterwards, when defining cusotm hooks which call mutations:
And finally, where it's used:
Let's say the error fails. Which onError do get called?
From what I understood, the hook-definition one, and the one directly called with
mutate
both get called. But what about the global one, does it still trigger?And does this behaviour change when using
mutateAsync
, as that one throws errors?All help is appreciated!
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions