Axios: Error: Request failed with status code

Created on 28 Jun 2017  路  1Comment  路  Source: axios/axios

When there is 404 error, I can't access the response. A request is failed. But whatever, I want to access the response. There is only an error parameter at the catch function. How can I access the response if there is a 404 error? It seems that axios has disabled doing this.

But sometimes there is a response, even though there is a 404 error.

Most helpful comment

Hey @umutozdemir97
You should check out https://github.com/mzabriskie/axios#handling-errors. Error object itself contains response.

>All comments

Hey @umutozdemir97
You should check out https://github.com/mzabriskie/axios#handling-errors. Error object itself contains response.

Was this page helpful?
0 / 5 - 0 ratings