Answers for "nuxt axios middleware"

3

nuxt axios middleware

export default function ({ $axios, redirect }) {
  $axios.onError(error => {
    if(error.response.status === 500) {
      redirect('/sorry')
    }
  })
}
Posted by: Guest on November-01-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language