From 6cd54f7e1ee7f04a9f1bb33a2b0dab733128a376 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Thu, 23 Oct 2025 05:26:30 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(backend)=20catch=20all=20request?= =?UTF-8?q?=20exceptions=20in=20summary=20service=20integration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace narrow HTTPError handling with broad RequestException catch to prevent crashes from network failures (ConnectionError), timeouts (30s exceeded), SSL/TLS errors, and other request failures that previously caused unhandled exceptions. Ensures consistent False return and proper logging for all network-related failures instead of crashing application when summary service communication encounters infrastructure issues beyond HTTP errors. --- src/backend/core/recording/event/notification.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/core/recording/event/notification.py b/src/backend/core/recording/event/notification.py index 5ff35d08..3138b923 100644 --- a/src/backend/core/recording/event/notification.py +++ b/src/backend/core/recording/event/notification.py @@ -158,9 +158,9 @@ class NotificationService: timeout=30, ) response.raise_for_status() - except requests.HTTPError as exc: + except requests.RequestException as exc: logger.exception( - "Summary service HTTP error for recording %s. URL: %s. Exception: %s", + "Summary service error for recording %s. URL: %s. Exception: %s", recording.id, settings.SUMMARY_SERVICE_ENDPOINT, exc,