When should an API return a 500 Internal Server Error versus a 503 Service Unavailable?
Last updated
500 Internal Server Error: an unexpected bug or unhandled exception. The client can't fix it and retrying usually won't help.503 Service Unavailable: a temporary condition (overload, deployment, maintenance, dependency outage). Pair it with aRetry-Afterheader.Rule of thumb: 500 = "something broke", 503 = "working fine, just not right now."