Skip to content

Commit

Permalink
updating error code
Browse files Browse the repository at this point in the history
  • Loading branch information
whitdog47 committed Dec 13, 2024
1 parent 8c7596b commit 9420d4b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/dispatch/signal/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def create_engagement(
)
except IntegrityError:
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
status_code=status.HTTP_409_CONFLICT,
detail=[{"msg": "A signal engagement with this name already exists."}],
) from None

Expand Down Expand Up @@ -191,7 +191,7 @@ def update_engagement(
)
except IntegrityError:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
status_code=status.HTTP_409_CONFLICT,
detail=[{"msg": "A signal engagement with this name already exists."}],
) from None

Expand All @@ -211,7 +211,7 @@ def create_filter(
)
except IntegrityError:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
status_code=status.HTTP_409_CONFLICT,
detail=[{"msg": "A signal filter with this name already exists."}],
) from None

Expand Down Expand Up @@ -240,7 +240,7 @@ def update_filter(
)
except IntegrityError:
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
status_code=status.HTTP_409_CONFLICT,
detail=[{"msg": "A signal filter with this name already exists."}],
) from None

Expand Down

0 comments on commit 9420d4b

Please sign in to comment.