Replies: 2 comments 1 reply
-
I have found one way to skip the error middleware but it seems a bit cluncky pass in an extra parameter to the query (skipGlobalErrorHandling) which will be ignored by the query itself but seems available in the originalArgs object in the error middleware
in error middleware only do the error handling if below is true Is this an ok thing to do ? Thank you |
Beta Was this translation helpful? Give feedback.
-
From my experiences #4301, you'll need to set meta info in the query definition |
Beta Was this translation helpful? Give feedback.
-
Hello
I have the error middle ware below which handles all errors for any api call made. We have a scenario now where we would like the error to be handled in the code and not in the middleware.
How could this be done?
i thought i could maybe set some meta flag in the component that wants to handle the error but did not succeed.
Like i though i could change the if statement in the middleware to this and then set that meta somewhere
if (isRejectedWithValue(action) && !action.meta?.handleErrorDirectly ) {
but i did not succeed setting that meta flag.
Any advice would be greatly appreciated. Thank you
Beta Was this translation helpful? Give feedback.
All reactions