log error when failing to parse URL

This commit is contained in:
Kovid Goyal
2024-02-15 13:26:28 +05:30
parent f4f06222d4
commit 1d5c7d662e

View File

@@ -1153,7 +1153,8 @@ def sanitize_url_for_dispay_to_user(url: str) -> str:
if purl.path:
purl = purl._replace(path=unquote(purl.path))
url = urlunparse(purl)
except Exception:
except Exception as e:
log_error(e)
url = 'Unparseable URL: ' + url
return url