Zest.
5xx · Server error

HTTP 502 Bad Gateway

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

Common causes and fixes

  • The app behind the proxy may be down or crashing: check that it is running and listening on the expected port.
  • Check the proxy's upstream address and its error log.

Example response

HTTP
HTTP/1.1 502 Bad Gateway
Content-Type: application/json; charset=utf-8

{ "error": "Bad Gateway" }

Look up the headers shown here in the HTTP headers reference.

Common questions

What does HTTP 502 mean?
Bad Gateway. A gateway or proxy got an invalid response from the upstream server.
How do I fix a 502 error?
The app behind the proxy may be down or crashing: check that it is running and listening on the expected port. Check the proxy's upstream address and its error log.
Is 502 an error?
Yes. 5xx codes are server errors: The server failed to fulfil a valid-looking request.

Other 5xx codes