mutate onError fires only ones when multiple requests fail #6827
Unanswered
swingthrough
asked this question in
Q&A
Replies: 1 comment 2 replies
-
this is documented here: https://tanstack.com/query/latest/docs/framework/react/guides/mutations#consecutive-mutations |
Beta Was this translation helpful? Give feedback.
2 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.
-
Here's a codesandbox example:
https://codesandbox.io/p/sandbox/amazing-kilby-ms6kz7?file=%2Fsrc%2FApp.tsx
I have this function, which might be called simultaneously on multiple rows that show orders:
If I fire cancellation of order 1 and then immediately fire cancellation of order 2 before the first one finishes (and both are about to fail),
onError
will be called only once.Why is this happening?
Beta Was this translation helpful? Give feedback.
All reactions