Skip to content

Commit

Permalink
chore(process_ses_results): add more details in exception logging (#2055
Browse files Browse the repository at this point in the history
)

* chore(process_ses_results): add more details in exception logging

* Force workflow re-run
  • Loading branch information
andrewleith authored Dec 5, 2023
1 parent 25c7682 commit 85aa6c9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/celery/process_ses_receipts_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,13 @@ def process_ses_results(self, response):
raise

except Exception as e:
current_app.logger.exception("Error processing SES results: {}".format(type(e)))
notifcation_msg = "Notification ID: {}".format(notification.id) if notification else "No notification"
notification_status_msg = (
"Notification status: {}".format(notification_status) if notification_status else "No notification status"
)
ref_msg = "Reference ID: {}".format(reference) if reference else "No reference"

current_app.logger.exception(
"Error processing SES results: {} [{}, {}, {}]".format(type(e), notifcation_msg, notification_status_msg, ref_msg)
)
self.retry(queue=QueueNames.RETRY)

0 comments on commit 85aa6c9

Please sign in to comment.