Re-fix previous error
Some checks failed
Build and Publish drop-in-url-previews / build_and_publish (push) Failing after 11m49s
Some checks failed
Build and Publish drop-in-url-previews / build_and_publish (push) Failing after 11m49s
This commit is contained in:
parent
c48571bb22
commit
e462d2d763
1 changed files with 2 additions and 2 deletions
|
@ -276,7 +276,7 @@ def preview_url(
|
|||
domain + "/_matrix/client/r0/account/whoami",
|
||||
headers={"Authorization": f"Bearer {access_token}"}
|
||||
)
|
||||
except httpx.NetworkError as e:
|
||||
except httpx.ConnectError as e:
|
||||
raise HTTPException(504, detail=f"Failed to contact homeserver for authentication: {e}")
|
||||
if response.status_code != 200:
|
||||
return INVALID_TOKEN
|
||||
|
@ -337,7 +337,7 @@ def preview_url(
|
|||
e.response.status_code,
|
||||
f"Failed to fetch {e.response.url} - HTTP {e.response.status_code}: {e.response.text}"
|
||||
)
|
||||
except (httpx.NetworkError, ConnectionError) as e:
|
||||
except (httpx.ConnectError, ConnectionError) as e:
|
||||
logging.debug(f"Failed to fetch {url}", exc_info=True)
|
||||
raise HTTPException(502, f"Failed to fetch {url} - {e}")
|
||||
|
||||
|
|
Loading…
Reference in a new issue