>_

5xx Server error

502 Bad Gateway

A gateway or proxy got an invalid response from the upstream server.

nginx, a load balancer or CDN tried to reach your application and the connection failed or returned garbage.

Common causes and fixes

Example response

HTTP/1.1 502 Bad Gateway
Date: Thu, 22 Oct 2026 08:00:00 GMT

Check a URL’s status with curl -I https://example.com, which prints the status line and headers.

Related status codes

Related tools

curl to Code · LLM API Playground · LLM Stream Parser