Static GitHub Issues

[2120] Custom Server error page

prev: Bulma sass variables
next: How can I make sure that the data that has just loaded into LocalStorage can be used immediately in the code?

If I kill my API server, then my app shows this error page

error

I made an error.vue layout, but it doesn't work in case of such issue

<template>
  <section class="viewport content">
          <h1 v-if="error.statusCode === 404">404</h1>
          <h1 v-else>An error occured</h1>
  </section>
</template>

<script>
export default {
  props: ['error'],
  transition: 'page'
}
</script>

My console is showing this

[Vue warn]: Error in render function: "TypeError: Cannot read property 'title' of undefined"

So this layout page component trick doesn't catch such errors? Then how to handle it?

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1880">#c1880</a>)</em></sub></div>