The HTTP 502 status code indicates that that gateway or proxy server, received an invalid response from the upstream server.
Sometimes server is not configured properly, that also send a 502 response to the browser.