5xx · Server errorretryable
500Internal Server Error
A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.
What this code obliges you to do
Retry
Safe to retry
Repeating the same request can succeed, so a client may back off and try again. Honour Retry-After when the response sends one.
Caching
Not cacheable by default
Caches will not store this response unless you send explicit freshness headers saying they may.
Response body
Body allowed
You may return a payload explaining the outcome — for an error, a machine-readable problem document is worth the effort.
What usually causes it
31
Unhandled code exceptions
2
Broken database queries
3
Missing environment variables
Effect on search
Highly negative. Google drops indexing frequency for domains that frequently return 500s. Sign of critical website instability.
How to send it
1Node.js
catch (err) { res.status(500).json({ error: 'Server crash!' }); }Codes people confuse with this one
2Class5xx
RetrySafe
CacheNo
BodyAllowed