Home

Issue: 3003

'Redirecting to external page.' on error

[issue link]

Steps to reproduce:

  1. Goto non-existing page
  2. ‘Redirecting to external page.’ is displayed for a few seconds.
  3. Then error.vue is displayed.

How can we skip displaying ‘Redirecting to external page.’?

I noticed this can be accomplished by swapping the following snippet in .nuxt/components/nuxt.js

// swap these two conditionals
 if (this.nuxt._redirected) {
      return h('div', [ 'Redirecting to external page.' ])
    }
    // If there is some error
    if (this.nuxt.err) {
      return h('nuxt-error', {
        props: {
          error: this.nuxt.err
        }
      })
    }
This question is available on Nuxt.js community (#c2602)