added 502 to RETRY_HTTP_CODES