title: catch and handle connection refused error using Axios
body: <p>I use Axios for my VueJs app and have a Express REST Api. When my VueJs app is not able to call the backend (connection refused / the node server is not running)</p>
  
  <p>How can I catch this error? I tried to log the error using an interceptor</p>
  
  <pre><code>  instance.interceptors.response.use(res =&gt; res, (err) =&gt; {
      console.log({ err });
  
      if (err.response.status === 401) {
        // unauthorized
      }
  
      return err;
    });
  </code></pre>
  
  <p>but when logging the <code>err</code> I only get </p>
  
  <blockquote>
    <p>Error: Network Error</p>
  </blockquote>
  
  <p>with <code>response: undefined</code></p>
  
  <p>Should I sign out the user because there is nothing he can do then or should I just show an error alert and let him stay?</p>