Skip to content

Commit

Permalink
fix(signal): log exception instead of warning for bad signal id (#5692)
Browse files Browse the repository at this point in the history
  • Loading branch information
whitdog47 authored Jan 16, 2025
1 parent 93ef841 commit 699fd28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dispatch/signal/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ def create_instance(
# remove non-serializable entities from the raw JSON:
signal_instance_in_raw = signal_instance_in.raw.copy()
if signal_instance_in.oncall_service:
signal_instance_in_raw.pop('oncall_service')
signal_instance_in_raw.pop("oncall_service")

# we round trip the raw data to json-ify date strings
signal_instance = SignalInstance(
Expand Down Expand Up @@ -603,7 +603,7 @@ def create_instance(

if signal_instance.id and not is_valid_uuid(signal_instance.id):
msg = f"Invalid signal id format. Expecting UUIDv4 format. Signal id: {signal_instance.id}. Signal name/variant: {signal_instance.raw['name'] if signal_instance and signal_instance.raw and signal_instance.raw.get('name') else signal_instance.raw['variant']}"
log.warn(msg)
log.exception(msg)
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail=[{"msg": msg}],
Expand Down

0 comments on commit 699fd28

Please sign in to comment.