From 2c8d6075f47592a4b645e9989e5ea64fdc8e9924 Mon Sep 17 00:00:00 2001 From: Philipp Kilian Date: Thu, 28 Sep 2023 11:23:35 +0200 Subject: [PATCH] records: use wider exception clause and add exception message --- b3lb/rest/classes/api.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/b3lb/rest/classes/api.py b/b3lb/rest/classes/api.py index cbb1398..4fe7fbe 100644 --- a/b3lb/rest/classes/api.py +++ b/b3lb/rest/classes/api.py @@ -30,7 +30,7 @@ from _hashlib import HASH from random import randint from requests import get -from requests.exceptions import ConnectionError +from requests.exceptions import RequestException from rest.b3lb.metrics import incr_metric, update_create_metrics from rest.b3lb.utils import get_checksum from rest.models import ClusterGroupRelation, Meeting, Metric, Node, Parameter, Record, RecordSet, Secret, SecretMeetingList, SecretMetricsList, Stats @@ -630,7 +630,8 @@ async def send_end_callback(self, end_callback_url: str): url = f"{end_callback_url}?meetingID={self.meeting_id}&recordingmarks={self.recording_marks}" try: get(url) - except ConnectionError: + except RequestException as rex: + print(f"Exception: {rex}") print(f"Couldn't send callback to URL: {url}") async def upload_record(self) -> HttpResponse: