502 Bad Gateway
A gateway or proxy got an invalid response from the upstream server.
What it means
The edge proxy is up, but the application behind it crashed or returned garbage.
What your client should do
Retry idempotent requests with backoff. Persisting 502s mean the backend is down.
Should you retry?
Yes, with exponential backoff and jitter, and only for idempotent requests (GET, PUT, DELETE) or requests protected by an Idempotency-Key.
Try it
The free practice API returns this status on demand, with the headers a well-behaved API would send. Call GET /api/play/status/502 from Endpoint Client and open the Explain tab.
Related codes
503 Service Unavailable
The server is temporarily unable to handle the request.
504 Gateway Timeout
A gateway did not get an upstream response in time.
Defined in RFC 9110. All status codes and headers