axios interceptors response undefined
I'm trying to logout my user once they get a 401. I'm using axios to return data from the api I was looking around and found the same axios.interceptors.response axios.interceptors.response.use( response => response, error => { const {status} = error.response; if (status === 401 ) { store.dispatch('snackBar', snackbarObj) } return Promise.reject(error); } ) It appears my error.response is undefined. I'm not sure what is wrong? any ideas? You're not getting a response from the request you're doing with Axios since the browser received a 401 unauthorized response when doing the preflight OPTION