Response Body in Error with useFetch
π,
I get the following error in an API request (see attachment).
Is there a way to get the response body using
useFetch
?
I have tried using interceptors but no luck so far. The status code and status message are fine, but the response body is nowhere to be found.2 Replies
You can get both the body and error by destructuring the return value of the
useFetch
promise.
Thank you! I solved it and it was one of these face palm moments π³ I simply forgot to add it to my error object (server error > fetch error in my store > error display on page)