🐛(backend) catch all request exceptions in summary service integration
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.
This commit is contained in:
committed by
aleb_the_flash
parent
315d48a501
commit
6cd54f7e1e
@@ -158,9 +158,9 @@ class NotificationService:
|
|||||||
timeout=30,
|
timeout=30,
|
||||||
)
|
)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
except requests.HTTPError as exc:
|
except requests.RequestException as exc:
|
||||||
logger.exception(
|
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,
|
recording.id,
|
||||||
settings.SUMMARY_SERVICE_ENDPOINT,
|
settings.SUMMARY_SERVICE_ENDPOINT,
|
||||||
exc,
|
exc,
|
||||||
|
|||||||
Reference in New Issue
Block a user