What 500 Internal Server Error means
500 Internal Server Error means the server encountered an unexpected condition that prevented it from fulfilling the request. It is not a statement about the client's request; it is a statement about the server's inability to handle it.
When a server should return it
- An unhandled exception escaped the application's error boundary.
- A dependency returned data the server could not parse.
- A configuration value is missing at runtime.
- A database constraint failed in a way the handler did not anticipate.
Example response
HTTP/1.1 500 Internal Server Error
Content-Type: application/problem+json
{"title": "Internal Server Error", "status": 500, "traceId": "c0ffee1234"}Why you might see it unexpectedly
- Null reference or type error in a code path without tests.
- Database connection pool exhaustion under load.
- A deploy with a missing environment variable.
- Disk full or permission denied on a write path.
- A JSON serializer encountering a circular structure.
Related status codes
502 Bad Gateway and 504 Gateway Timeout are upstream failures. 503 Service Unavailable is deliberate unavailability. 400 and 422 are client-side validation problems.