| Previous | Next |
| HTTP_STATUS_NOT_SUPPORTED | HTTP_STATUS_SERVICE_UNAVAIL |
HTTP_STATUS_BAD_GATEWAY
The failing component is usually between the client and the application: reverse proxy, load balancer, API gateway, or CDN. The upstream can be unavailable, speak the wrong protocol, reset the connection, or return malformed data.
Compare proxy and upstream logs using the same request ID. Check upstream address, TLS settings, health checks, timeouts, and response framing before changing the client request.
Operational meaning of HTTP 502 for HTTP_STATUS_BAD_GATEWAY
HTTP 502 (HTTP_STATUS_BAD_GATEWAY) is a server-error response. AllStat records its meaning as “502 Bad Gateway”. For HTTP_STATUS_BAD_GATEWAY, interpret it with the request method, selected representation, response headers, and the specification or product that defines the code; the number alone does not prove that application work completed.
Client and server handling for HTTP_STATUS_BAD_GATEWAY
- Correlate HTTP_STATUS_BAD_GATEWAY with origin, gateway, load-balancer, and dependency logs to locate which hop generated it.
- For HTTP_STATUS_BAD_GATEWAY, record request and trace identifiers, upstream timing, retry count, and the health of the selected backend.
- For HTTP_STATUS_BAD_GATEWAY, use bounded retries with backoff only for idempotent work and only when the service policy permits them.
For telemetry, record HTTP 502, method, authority, route template rather than secrets, response headers relevant to caching or retry, latency, upstream identity, and whether the response originated at the application or an intermediary.
Looking for a different code? Search another status or error code.