Error from axios how to handle it
Here is the mutation query
if i get a 401 in response, how to handle that, does it will be get caught by react query or i have to handle it within the mutation function.. im confused a bit about this...
4 Replies
fair-rose•3y ago
Did you read the documentation of useMutation?
robust-apricotOP•3y ago
@M00LTi i did
This function will fire if the mutation encounters an error and will be passed the error. means if promise get reject or throw an error, error will be triggeredfair-rose•3y ago
Does this answer your question?
robust-apricotOP•3y ago
Yes