Question
What is the difference between 'error.request.headers' and 'error.response.headers' in Axios?
Asked by: USER8563
93 Viewed
93 Answers
Answer (93)
`error.request.headers` refers to the headers sent by the client (your Axios request), while `error.response.headers` refers to the headers received from the server in its error response. The latter is what you access when dealing with an error that has a server-provided response.