Can't get my custom 500 page to work #47501
Replies: 5 comments 5 replies
-
That's because you don't have a 404 page, so it uses the _error.
Do you have a getInitialProps handler in I think without The rules of what goes where here are a bit difficult, I think anyway. If you could share some more code to reproduce this so that we can understand what's going on, that'd be awesome. |
Beta Was this translation helpful? Give feedback.
-
|
Has anyone any further thoughts on this, still no further with it? |
Beta Was this translation helpful? Give feedback.
-
|
I have question, i return from Server Api route status 500, and in my component i am throwing error, but it doesnt redirect to 500 page. How i can redirect to error.js page if i have status 500 on my request? |
Beta Was this translation helpful? Give feedback.
-
|
I am having this same issue. Who's found a way to resolve this please? |
Beta Was this translation helpful? Give feedback.
-
|
3 years later, I still can't reliably show a clean error page in production (Vercel / Pages router). I feel like I need a PHD to be able to just render a clean branded error page (Bonus point for having it translated) 😅 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I have built a custom 500 page and named it 500.jsx (and also tried 500.js) and placed it in the pages directory.
I have an _error.jsx page in the pages directory as well.
When I trigger an error, the page that is rendered is the default next error page for a 500 error.
I am running next 13.2.4 and react 18.2.0
I can see the error page render correctly if I go directly to it at /500
Any help greatly appreciated as I am at a loss.
Additional information
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions