Skip to content
MtrXTools

500 Internal Server Error

The application hit an error it did not handle

Seen in Web servers, APIs, frameworks

Something failed inside the server while handling the request, and it returned a generic error instead of a result.

Common causes

  • An unhandled exception in application code.
  • A missing environment variable, secret or config file.
  • A failing database or downstream dependency the app does not handle.
  • A syntax error in server config such as an Apache .htaccess file.

How to fix it

  1. Check the application error log at the time of the request; the stack trace names the cause.
  2. Reproduce with the same request and inputs in a staging environment.
  3. Check recent deploys and config changes, and roll back if the errors started with one.
Check the response

Got a different message? Paste it into the error explainer.

Related errors

All 51 HTTP & CDN errors