title: NUXT JS Interceptor for 404 or any errors with error method not working
body: <h3>Version</h3>
  
  <p><a href="https://github.com/axios-module/releases/tag/v5.8.0" rel="nofollow noreferrer">v5.8.0</a></p>
  
  <h3>Reproduction link</h3>
  
  <p><a href="https://github.com/msonowal/nuxt-bug-reproduce-link" rel="nofollow noreferrer">https://github.com/msonowal/nuxt-bug-reproduce-link</a></p>
  
  <h3>Steps to reproduce</h3>
  
  <p>add this in 
  <code>plugins</code> dir make file name it  <code>axios.js</code></p>
  
  <p>and add the link in nuxt config plugins array 
  visit any route whose axios calls are 404 </p>
  
  <p>axios.js  file content below</p>
  
  <pre><code>export default function({ $axios, error }) {
    $axios.onError((responseError) =&gt; {
      if (responseError.response.status === 404) {
        error({ statusCode: 404, message: 'Post not found from interceptor' })
      }
    })
  }
  </code></pre>
  
  <h3>What is expected ?</h3>
  
  <p>show the error response with 404 code as defined in the nuxt app
  Post not found from interceptor</p>
  
  <p>but</p>
  
  <p>not redirect to 301</p>
  
  <h3>What is actually happening?</h3>
  
  <p>it is showing default nuxt error</p>
  
  <p><strong>NuxtServerError</strong>
  <code>Request failed with status code 404</code></p>
  
  <p></p>
  
  <sub><em>This bug report is available on <a href="https://cmty.app/nuxt" rel="nofollow noreferrer">Nuxt</a> community (<a href="https://cmty.app/nuxt/axios-module/issues/c305" rel="nofollow noreferrer">#c305</a>)</em></sub>