Fetch: `catch` does not contain response object or response status `TypeError: Failed to fetch`

Created on 3 Apr 2017  路  3Comments  路  Source: github/fetch

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.

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.

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

karladler picture karladler  路  4Comments

javan picture javan  路  3Comments

xgqfrms-GitHub picture xgqfrms-GitHub  路  4Comments

huanghaiyang picture huanghaiyang  路  3Comments

codeashian picture codeashian  路  3Comments