raise TransportNotFoundError, url
elif e.code == 500:
raise TransportInternalServerError, url
- elif e.code == 503:
+ elif e.code in (502, 503):
raise TransportBadGatewayError, url
elif e.code == 504:
raise TransportConnectionTimeoutError, url
try:
return self.one_request(url, **kwargs)
- # 500 - Internal Server Error
- except TransportInternalServerError, e:
+ # 500 - Internal Server Error, 502 + 503 Bad Gateway Error
+ except (TransportInternalServerError, TransportBadGateway), e:
log.exception("%s" % e.__class__.__name__)
# Wait a minute before trying again.