So I'm sending a request, and it is sent sucessfuly, but in axios
I'm not getting the interceptor back and I don't get why, instead of that I got an error: Cannot read property 'status' of undefined
.
Here is my code for interceptor:
listService.interceptors.response.use(
(response) => {
console.log('Interceptor', response);
return response;
},
(error) => {
if(error.response.status == 401){
console.log("Status of undefined!")
}
}
);