Custom "500: Internal Server Error" page (to handle middleware exceptions.) #73056
Unanswered
robcaldecott
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
When an exception occurs in custom middleware, Next will render a generic 500: Internal Server Error page but I cannot find a way to customise this. I have tried
app/global-error.tsx
andapp/error.tsx
and neither are used.I'd really like a way to show a custom page along with some details of the exception if possible. One solution I saw was to Cath middleware errors and then redirect to a special page with the exception details encoded as a URL param. Before I go down this route, I wondered if there was an officially sanctioned way to do this?
Many thanks.
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions