From abf0de07ef6962fe737945f2f1dbbe96c86d9c24 Mon Sep 17 00:00:00 2001 From: Denys Fedoryshchenko Date: Mon, 24 Feb 2025 08:55:07 +0200 Subject: [PATCH] upd(base.py): Improve reliability and logging of dynamic branch check It is unusual if we have URL scheme and HTTP check fails, so better if we log it. Signed-off-by: Denys Fedoryshchenko --- src/base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/base.py b/src/base.py index 1c413e6cc..c8541c0d9 100644 --- a/src/base.py +++ b/src/base.py @@ -92,8 +92,7 @@ def validate_url(url): return False try: r = requests.head(url) - if r.status_code != 200: - return False + r.raise_for_status() except Exception as e: logging.error(f'Error accessing URL: {e}') return False