Skip to content

Commit

Permalink
records: use wider exception clause and add exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippKilian committed Sep 28, 2023
1 parent 10c3465 commit 2c8d607
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions b3lb/rest/classes/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 2c8d607

Please sign in to comment.