handle gateway error
This commit is contained in:
@@ -122,6 +122,9 @@ class Sender:
|
|||||||
# session = HTMLSession()
|
# session = HTMLSession()
|
||||||
self.logger.info("blocked by hermes, mail:{}".format(contact.mail))
|
self.logger.info("blocked by hermes, mail:{}".format(contact.mail))
|
||||||
return RequestResult.BLOCKED
|
return RequestResult.BLOCKED
|
||||||
|
elif response.status_code == 502:
|
||||||
|
self.logger.info("proxy error, mail:{}".format(contact.mail))
|
||||||
|
return RequestResult.PROXY_ERROR
|
||||||
return RequestResult.BLOCKED
|
return RequestResult.BLOCKED
|
||||||
except Exception as Error:
|
except Exception as Error:
|
||||||
print(Error)
|
print(Error)
|
||||||
|
|||||||
Reference in New Issue
Block a user