A gateway or proxy received an invalid response from the upstream server.
Quick facts
When does it occur
A gateway or proxy received an invalid response from the upstream server.
It belongs to the 5xx Server Error class of responses, defined in RFC7231#6.6.3.
Browse all codes in this class: 5xx Server Error
How to fix it
Check the upstream service's health, timeouts and error logs, then retry.
Common causes
How to fix it
Double-check the URL, return to the homepage and search again, or retry later.
Check the upstream service's health, timeouts and error logs, then retry.
Check service logs and health, confirm upstream dependencies, restart or scale if needed, then verify monitoring alerts.
Frequently asked questions
502 belongs to the 5xx Server Error class and is generally not cached for long; behavior is controlled by Cache-Control.
5xx Server Error: A gateway or proxy received an invalid response from the upstream server.
Sources & standards
Updated 2026-08-18
Explore this reference
Related status codes