Print networke rrors
This commit is contained in:
parent
fae8edb043
commit
16de655902
1 changed files with 1 additions and 0 deletions
|
@ -279,6 +279,7 @@ def preview_url(
|
||||||
f"Failed to fetch {e.response.url} - HTTP {e.response.status_code}: {e.response.text}"
|
f"Failed to fetch {e.response.url} - HTTP {e.response.status_code}: {e.response.text}"
|
||||||
)
|
)
|
||||||
except httpx.NetworkError as e:
|
except httpx.NetworkError as e:
|
||||||
|
logging.debug(f"Failed to fetch {url}", exc_info=True)
|
||||||
raise HTTPException(502, f"Failed to fetch {url} - {e}")
|
raise HTTPException(502, f"Failed to fetch {url} - {e}")
|
||||||
|
|
||||||
if "text/html" not in response.headers.get("content-type", ""):
|
if "text/html" not in response.headers.get("content-type", ""):
|
||||||
|
|
Loading…
Reference in a new issue