diff options
author | Andrew Godwin | 2022-11-21 08:57:00 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-11-21 15:41:12 -0700 |
commit | 0fdeb48ff48ae4561e2eb00b3fcdaa2b70046569 (patch) | |
tree | 874750519a73afd7427ccbe492f4badb8932d27a /users | |
parent | 8d56f8388ff58680a9419e55669778c22e5c9460 (diff) | |
download | takahe-0fdeb48ff48ae4561e2eb00b3fcdaa2b70046569.tar.gz takahe-0fdeb48ff48ae4561e2eb00b3fcdaa2b70046569.tar.bz2 takahe-0fdeb48ff48ae4561e2eb00b3fcdaa2b70046569.zip |
Catch more request errors
Diffstat (limited to 'users')
-rw-r--r-- | users/models/identity.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/users/models/identity.py b/users/models/identity.py index d7572d6..7116021 100644 --- a/users/models/identity.py +++ b/users/models/identity.py @@ -305,7 +305,7 @@ class Identity(StatorModel): method="get", uri=f"https://{domain}/.well-known/webfinger?resource=acct:{handle}", ) - except httpx.RequestError: + except (httpx.RequestError, httpx.ConnectError): return None, None if response.status_code in [404, 410]: return None, None @@ -339,7 +339,7 @@ class Identity(StatorModel): method="get", uri=self.actor_uri, ) - except httpx.RequestError: + except (httpx.ConnectError, httpx.RequestError): return False if response.status_code == 410: # Their account got deleted, so let's do the same. |