nuxt wait middleware axios code example
Example: nuxt axios middleware
export default function ({ $axios, redirect }) {
$axios.onError(error => {
if(error.response.status === 500) {
redirect('/sorry')
}
})
}
export default function ({ $axios, redirect }) {
$axios.onError(error => {
if(error.response.status === 500) {
redirect('/sorry')
}
})
}