500 Internal Server Error
The server hit an unexpected condition that stopped it from fulfilling the request.
| Class | Server error (5xx) |
|---|---|
| Defined in | RFC9110, Section 15.6.1 |
| Cacheable by default | No, unless explicit freshness headers allow it |
Common causes
- An unhandled exception or bug in the application.
- A misconfigured server, a failing dependency such as a database, or a bad deploy.
What to do
Read the server logs to find the exception, since the client cannot fix a 500. Never expose stack traces to users.
Related codes
- 502 Bad Gateway: A gateway or proxy received an invalid response from the upstream server.
- 503 Service Unavailable: The server is not ready to handle the request, often because of overload or maintenance.
- 504 Gateway Timeout: A gateway or proxy did not get a response from the upstream server in time.