Skip to content

Commit

Permalink
Change how the exception handling will work (#2435)
Browse files Browse the repository at this point in the history
  • Loading branch information
jzbahrai authored Jan 30, 2025
1 parent 9f04693 commit 83573c5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/celery/process_ses_receipts_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ def process_ses_results(self, response): # noqa: C901
ses_message = json.loads(response["Message"])
notification_type = ses_message["notificationType"]

if notification_type == "Complaint":
_check_and_queue_complaint_callback_task(*handle_complaint(ses_message))
return True

reference = ses_message["mail"]["messageId"]
try:
if notification_type == "Complaint":
_check_and_queue_complaint_callback_task(*handle_complaint(ses_message))
return True

reference = ses_message["mail"]["messageId"]
notification = notifications_dao.dao_get_notification_by_reference(reference)
except NoResultFound:
try:
Expand Down

0 comments on commit 83573c5

Please sign in to comment.