From b3bd8945c7416ac585f91e98e1cc42ed41ebf060 Mon Sep 17 00:00:00 2001 From: Sergey Motornyuk Date: Mon, 11 Nov 2024 01:25:10 +0200 Subject: [PATCH] fix: invalid error is not tracked --- check_link/checker.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/check_link/checker.py b/check_link/checker.py index 6e3ab90..f03b317 100644 --- a/check_link/checker.py +++ b/check_link/checker.py @@ -71,7 +71,7 @@ async def check(self, link: Link) -> Link: # link.state_from_code(e.status, e.message, e.headers or {}) except (asyncio.TimeoutError, httpx.TimeoutException): link.state_from_exception(TimeoutError("Timeout reached")) - except (ssl.SSLError, httpx.RequestError) as e: + except (ssl.SSLError, httpx.RequestError, httpx.InvalidURL) as e: link.state_from_exception(e) except Exception as e: log.error("Unhandled request exception for link %s: %s", link, e) diff --git a/pyproject.toml b/pyproject.toml index c38189f..f0045fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "check_link" -version = "0.0.10.post1" +version = "0.0.11" description = "Check if URL is available" classifiers = [ "Development Status :: 4 - Beta", "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10",] keywords = [ "URL", "validator", "HTTP",]