Tuesday, 23 May 2023

Nuxt custom error page doesn't load for uncaught errors

I'm trying to use a custom error page in Nuxt (see: https://nuxtjs.org/docs/concepts/views/#error-page).

I've created layouts/error.vue, but this page doesn't load for uncaught exceptions, for example:

<script>
export default {
  computed: {
    component() {
      return () => import(`./non-existent-component.vue`);
    },
  }
}
</script>

When this error occurs server-side, I see the standard production error page. Is there a way to catch this in a generic way so that my custom error page loads in that instance?

enter image description here



from Nuxt custom error page doesn't load for uncaught errors

No comments:

Post a Comment