5xx Server Error
I'm a middleman server, and the server I was trying to talk to gave me a bad or broken response.
Use 502 when acting as a gateway or proxy and the upstream server sends an invalid or unusable response.
GET https://api.example.test/api/data502 Bad Gateway
# Headers
Content-Type: application/json
# Body
{
"error": "bad_gateway"
}Backend API returned malformed JSON that proxy couldn't parse
Something broke on our end! It's not your fault - our server had a problem and couldn't handle your request.
Our service is temporarily down for maintenance or overloaded. Please try again later.
I'm a middleman server, and the server I was trying to talk to took too long to respond, so I gave up waiting.