title: How can I access the current fullPath inside of a axios plugin in Nuxt.js?
body: <p>I am trying to get the current path through <code>route.fullPath</code> from within a Nuxt plugin for Axios. It is working to a degree, but it looks like because it is coming from the context, it is only ever setting the path when the page was initially loaded. How can I get the current <code>route.fullPath</code> (after any route changes) at the time of the Axios error to show?</p>
  
  <pre class="lang-js prettyprint-override"><code>export default function ({ $axios, store, route, redirect }) {
    $axios.onError((error) =&gt; {
      if (error.response.status === 401) {
        store.commit('misc/setRedirect', route.fullPath);
  
        redirect('/sign-in');
      }
    });
  }
  </code></pre>