HTTP/5xx (Server Error)
500 Internal Server Error
A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.
❓ Why does this happen?
Unhandled runtime exceptions, database connection drops, syntax errors in backend scripts.
✅ How to fix it
Check application server logs, error tracking (Sentry), and database connection pools.
Return or handle 500 in your stack
// app/api/resource/route.ts
export function GET() {
return Response.json(
{ error: "Internal Server Error", status: 500 },
{
status: 500
}
);
}Live 500 mock endpoint
Point your app, tests, or retry logic at this free public URL to reproduce a real 500 response (CORS enabled, optional ?delay=ms up to 5000).
https://castov.com/api/mock/500500 vs similar status codes
Frequently Asked Questions
What does HTTP Status 500 mean?
Why am I getting a 500 status code?
How do I fix a 500 Internal Server Error error?
What is the difference between 500 Internal Server Error and 503 Service Unavailable?
How can I test how my app handles a 500 response?
Other 5xx status codes
Browse the full HTTP status codes directory or troubleshoot terminal errors in the Error Fix Encyclopedia.