I'm having trouble getting Next.js to display its default 500 error page. While most sources discuss creating a custom error page, the Next.js documentation only briefly references their built-in 500 error page. I want the default page to show up when the API returns a 500 status.
When the API response is 500, Next.js should automatically show a 500 error page. Currently, it just goes back to the page where the request originated.
return res.status(500).end();