How can i access the isError to handle post requests errors? #4651
Unanswered
gmcamposano
asked this question in
Q&A
Replies: 2 comments
-
Never mind.
And addPerson i use the state which is isError So if I have a CRUD, i have to attach the isError method to each of the functions? addPerson.isError, updatePerson.isError... etc? |
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
Uh oh!
There was an error while loading. Please reload this page.
-
I made a small app to add people, where i intentionally try to return an error with duplicate ids. I am struggling also with a bigger app to find out how to use isError to be able to handle errors.
https://codesandbox.io/s/stupefied-bush-y4wcc7?file=/src/App.js
How can i handle the error that comes from the api with 500 status?
Beta Was this translation helpful? Give feedback.
All reactions