Setting error from the server in useMutation
I am using the useMutation hook to post data to the backend. I need to render the error message received from the backend. I can't seem to destructure the error message correctly.
How do I set the error message to the onError prop?
1 Reply
fair-rose•4y ago
The error in useMutation is exactly the same as the one in onError.