title: axios interceptors response undefined
body: <p>I'm trying to logout my user once they get a 401. I'm using axios to return data from the api </p>
  
  <p>I was looking around and found the same axios.interceptors.response</p>
  
  <pre><code>  axios.interceptors.response.use(
      response =&gt; response,
    error =&gt; {
      const {status} = error.response;
      if (status === 401 ) {
        store.dispatch('snackBar', snackbarObj)
      } 
     return Promise.reject(error);
    }
  )
  </code></pre>
  
  <p>It appears my error.response is undefined. I'm not sure what is wrong? any ideas? </p>
  
  <p><a href="https://i.stack.imgur.com/CAWv3.png" rel="noreferrer"><img src="https://i.stack.imgur.com/CAWv3.png" alt="console.dir of the error"></a></p>