Handle HTTPError: 502 Bad Gateway