TanStackT
TanStack3y ago
6 replies
dangerous-fuchsia

How can i access server error response

Server returns
return res.status(400).send({ error: "Invalid email or password." });


When I print out the error in the onError call back of useMutation, or access the error from the mutation itself like myMutation.error.msg

I get something like ": Request failed with status code 400"
How do i get access to this info returned from the server { error: "Invalid email or password." }
Was this page helpful?