I'm trying to use axios request and response interceptors, but when the request fails it does not trigger response interceptor but error interceptor. And frankly it doesn't contain response body. Though I'm pretty sure axios's error.response object had data on it. Is that possible to extract response body from failed axios response in axios error interceptor?
this.#axiosInstance = axios.create();
this.#axiosInstance.interceptors.request.use(null, (error) => {
// no `response` on error variable
});
this.#axiosInstance.interceptors.response.use(null, (error) => {
// no `response` on error variable
});