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.

Open /api/play/status/502

Related codes

Defined in RFC 9110. All status codes and headers