Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catch does not contain response object or response status TypeError: Failed to fetch #501

Closed
sndsgn opened this issue Apr 3, 2017 · 3 comments

Comments

@sndsgn
Copy link

sndsgn commented Apr 3, 2017

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.

@sndsgn sndsgn changed the title catch does not contain response object or status TypeError: Failed to fetch catch does not contain response object TypeError: Failed to fetch Apr 3, 2017
@sndsgn sndsgn changed the title catch does not contain response object TypeError: Failed to fetch catch does not contain response object or response status TypeError: Failed to fetch Apr 3, 2017
@sndsgn sndsgn closed this as completed Apr 3, 2017
@matt-mcdaniel
Copy link

I have the same issue @sndsgn, did you resolve this?

@sndsgn
Copy link
Author

sndsgn commented Apr 10, 2017

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.

@sndsgn sndsgn reopened this Apr 10, 2017
@dgraham
Copy link
Contributor

dgraham commented Apr 10, 2017

See #201 for past discussion.

@dgraham dgraham closed this as completed Apr 10, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants