Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed setup cannot redirect to error page if the user was already on error page #15041

Closed
huang-julien opened this issue Sep 27, 2022 · 2 comments

Comments

@huang-julien
Copy link
Member

Environment


  • Operating System: Linux
  • Node Version: v16.16.0
  • Nuxt Version: 3.0.0-rc.11
  • Nitro Version: 0.5.4
  • Package Manager: yarn@3.2.2
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/nuxt-starter-cit83n?file=error.vue,pages%2Ftest.vue,app.

You'll be redirected to the error.vue, click on the reload button then a blank page should appear

Describe the bug

Hi 😃 , there's is a strange bug concerning clearError or createError.

This might be linked to #14805 ?

Navigating to /test redirect the user to an error page. I'd like to reload the page using clearError with a redirect option however the user is not being redirected to the error page and the render fails since there's a throw in Test.vue.

Additional context

this issue might need a better title

Logs

No response

Copy link
Member

FWIW, vue-router won't redirect to the same page, and even though the error page was handling it, the route was still /test - so you don't need to redirect. But that's not the issue.

The issue is that on client-side, we don't show a full screen error page but instead leave it to the user to handle errors with error boundaries, hooks, etc. If you want the full screen error page on client-side, then set fatal: true within your createError and you should be good to go.

@danielroe danielroe closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2022
@huang-julien
Copy link
Member Author

I see, thank you 👍

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants