[Vuejs]-Nuxt fetch method, if API error make whole site respond with 404 error

0👍

I gotta look into details itself, but so far I think you need to catch an error with axios, a bit like:

...      
.then(response => {
        return response
      })
      .catch(error => {
        return error
        // return Promise.reject(error)
      })
...

And then you can v-if="…error" or so to, to make the component appear.

I hope that pushes you in a better direction.

Leave a comment