What is the difference between a 502 and a 503 error?

A 502 error usually means one server received an invalid response from another server it was relying on, while a 503 means the server itself is temporarily unavailable, often due to overload or maintenance. Both are usually short-term issues. This explanation of what a 503 error means covers common causes.