500 Internal Server Error
Generic server error: something crashed on the server.
Common causes
- An unhandled error in server code (exception, null value)
- Misconfiguration, missing environment variables, database connection errors
How to fix
- Check the application / server logs at the time of the error
- Reproduce with the same data; catch errors and return a proper 4xx when the input is at fault
Detailed reference (MDN) ↗RFC 9110 §15.6.1 ↗
Which code should I use?
- 500 / 503: 500: an unexpected error in the code. 503: temporarily overloaded or under maintenance; add Retry-After and Google will come back later instead of dropping the page.
