-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Add mechanism to customize Nuxt's default Fallback error pages (for Nitro) #28226
Comments
Start a new pull request in StackBlitz Codeflow. |
If there is an error rendering the error page then we fall back to a static page. Your middleware means that it throws an error even when rendering the error page. Check the page route/path first. |
Hi @danielroe, thank you for your comment. That middleware is causing an error on purpose, outside of any pages. What I was trying to point out is that the fallback error page we see pictured in my first comment, and linked in the reproduction Stackblitz, is not related to Those fallback templates are provided by Also seems to be imported here: https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/core/runtime/nitro/error.ts#L67 Thank you |
Alright, so I have changed the title of this issue to better represent my current understanding of how these pages work. That 'fallback error page', which is not to be confused with the Error Page (i.e.: As per https://vuejs.org/api/application.html#app-config-errorhandler, https://nuxt.com/docs/getting-started/error-handling#vue-errors and https://nitro.unjs.io/config#errorhandler, a new error handler can be provided in I truly couldn't find an example online, so I took upon myself to try it on this online code editor: https://stackblitz.com/edit/github-bf8y4g-7iqjdn?file=server%2Ferror.ts Hopefully this helps someone else. The new request for this issue: |
Environment
Darwin
v20.10.0
3.12.3
3.12.0
2.9.7
npm@10.2.3
-
-
-
-
Reproduction
https://stackblitz.com/edit/github-bf8y4g?file=server%2Fmiddleware%2Fsample.js
Describe the bug
The error page that is displayed when there are server errors is not editable and doesn't get replaced by
error.vue
:Additional context
The documentation about Error Page has been followed but it doesn't seem to apply to the 500 error described
Logs
No response
The text was updated successfully, but these errors were encountered: