Skip to content
Discussion options

You must be logged in to vote

500 errors for an API route would not display an HTML page, rather just a server HTTP status code of 500.

As far as when the 500 error page would show, one example I can think of is if you have a page that uses getServerSideProps and that has an error in it.

export async function getServerSideProps(context) {
  throw new Error("500 page will be shown")
}

Basically any runtime error that happens on a page while running on the server (aka Node) would cause this to happen.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bscaspar
Comment options

Answer selected by bscaspar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants