504 Gateway Timeout
A gateway did not get an upstream response in time.
What it means
The backend was too slow. The operation may still complete on the server.
What your client should do
Before retrying a non-idempotent request, check whether it already succeeded. Use idempotency keys.
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/504 from Endpoint Client and open the Explain tab.
Related codes
408 Request Timeout
The server gave up waiting for the request.
502 Bad Gateway
A gateway or proxy got an invalid response from the upstream server.
Defined in RFC 9110. All status codes and headers