500 Internal Server Error is the generic answer when the server hit an unexpected problem and has no more specific code to give. The fault is on the server side.
HTTP/1.1 500 Internal Server ErrorCommon causes
- An unhandled exception in the application code.
- A misconfiguration, such as an invalid .htaccess file or missing environment variable.
- A failing database query or dependency that the code does not handle.
How to fix it
- As a client, retry later; if it keeps happening, report it with the time and request details.
- As the server owner, check the application and server error logs: the stack trace is there, not in the response.
- Return a more specific status (400, 404, 503) when the cause is known.