handle error when protonmail WKD returns 2028
This commit is contained in:
parent
5c20ee0f7f
commit
da9d5cf6ee
|
|
@ -17,6 +17,9 @@ def request_from_wkd(email: str, server: str) -> str:
|
|||
except requests.exceptions.SSLError:
|
||||
print(f"SSL Error when querying {wkd_url}")
|
||||
return ""
|
||||
if b"Too many recent failed key server lookups" in r.content:
|
||||
print(f"Too many failed lookups error when queying {wkd_url}")
|
||||
return ""
|
||||
if r.status_code >= 400:
|
||||
return ""
|
||||
return base64.b64encode(r.content).decode().strip()
|
||||
|
|
|
|||
Loading…
Reference in a new issue