Replies: 1 comment
-
See here for some related discussion. It seems like this could work. |
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
-
There are patterns detailed in the documentation regarding handling errors on a macro level, in a listener middleware, with
createListener
and also others that refer to handling inline errors in the component withisError
anderror
, as returned by the generated rtk-query hooks.https://redux-toolkit.js.org/rtk-query/usage/error-handling
I was wondering if it's possible to combine both, something like this (pseudo-code):
Any thoughts as to whether this is a reasonable way to go? The
inlineErrorCodes
param would not be sent to the server, it would be used on the client only.Is this a reasonable use of
originalArgs
or is this hacky? Is it OK to use query params for strictly client side data like this?The purpose is to avoid handling errors in all components as in certain components there are no inline errors to care about and the macro level handler should suffice.
Beta Was this translation helpful? Give feedback.
All reactions