Question about catch inside .run effect #2548
Unanswered
Muhammed9991
asked this question in
Q&A
Replies: 0 comments
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.
-
The
.run
effect has the following signature:The
catch
is very useful if you have a single network request and in case it fails send a failure action. If it has multiple network requests each request might be handled slightly differently depending on the context. Is it recommended not to use catch in this case? Or are there any other ways around this issue.Example:
Only way I can think of solving this is to ignore the catch and do this:
Then handle success and failure in the reducer as normal.
Beta Was this translation helpful? Give feedback.
All reactions