Skip to content

500 Internal Server Error

Meaning

A generic error message indicating that the server encountered an unexpected condition that prevented it from fulfilling the request.

When to Use

When an unexpected runtime error or exception occurs on the server side, and no more specific 5xx code is suitable. It's a catch-all for server errors that don't have a dedicated code.

Example

If an application throws an unhandled exception or the server runs out of memory while processing the request, it might return 500 Internal Server Error because it cannot complete the request as expected.

When Not to Use

Do not use for client-side errors or predictable failures that have specific codes. Use more specific 5xx codes if applicable (e.g., 502 for upstream errors, 503 for overload or maintenance) before resorting to 500.

Source

RFC 9110


Released under the MIT License.