500 Internal Server Error
The server hit an unexpected error.
What it means
A bug or unhandled exception on the server. The request may or may not have had side effects.
What your client should do
Retry only idempotent requests, with backoff. Report the request ID to the API owner.
Should you retry?
Yes, with exponential backoff and jitter, and only for idempotent requests (GET, PUT, DELETE) or requests protected by an Idempotency-Key.
Security angle
Error bodies must not include stack traces, SQL or internal paths (OWASP API8 Security Misconfiguration).
Try it
The free practice API returns this status on demand, with the headers a well-behaved API would send. Call GET /api/play/status/500 from Endpoint Client and open the Explain tab.
Related codes
502 Bad Gateway
A gateway or proxy got an invalid response from the upstream server.
503 Service Unavailable
The server is temporarily unable to handle the request.
Defined in RFC 9110. All status codes and headers