Ignoring RTKQ errors from unmounting components #1226
nickbabcock
started this conversation in
General
Replies: 1 comment 2 replies
-
That is why the example only shows that for |
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
-
When the user causes a component with a query in motion to unmount, a somewhat generic
ConditionError
is raised which if someone is trying to handle errors at the macro level will show a toast telling the user about the aborted request.I workaround this by attempting to detect this error and swallow it as users don't care about these requests after they've navigated to the next page.
The below code is what I use
Let me know if I've missed something and accidentally implemented something I didn't need to.
Beta Was this translation helpful? Give feedback.
All reactions