A get request response with a 401 response status seems to only allow you to catch the error and the information provided is the following. TypeError: Failed to fetch.
In catch one does not appear to have access to the response object or status.
I have the same issue @sndsgn, did you resolve this?
I can't tell if this was done intentionally for security purposes to not expose the response. However, I still believe the response status code should be provided in the catch. I will reopen as it seems to be a common need to capture the status code.
See #201 for past discussion.
Most helpful comment
I can't tell if this was done intentionally for security purposes to not expose the response. However, I still believe the response status code should be provided in the catch. I will reopen as it seems to be a common need to capture the status code.