How can I access the current fullPath inside of a axios plugin in Nuxt.js? How can I access the current fullPath inside of a axios plugin in Nuxt.js? vue.js vue.js

How can I access the current fullPath inside of a axios plugin in Nuxt.js?


That seems like a bug, but as a workaround, you could get the current route through app.router.currentRoute of the plugin's app parameter:

// plugins/axios.jsexport default function ({ $axios, app }) {  $axios.onError(error => {    console.log(error, app.router.currentRoute)  })}