From 977554781f043c4ac735fcdd41f50e74017a467f Mon Sep 17 00:00:00 2001 From: David McDonald Date: Wed, 30 Dec 2020 17:28:21 +0000 Subject: [PATCH] Add better logging message for tech failure So we can easily identify which notification ID failed --- app/celery/provider_tasks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/celery/provider_tasks.py b/app/celery/provider_tasks.py index e9eed5222..65878f1f6 100644 --- a/app/celery/provider_tasks.py +++ b/app/celery/provider_tasks.py @@ -48,7 +48,9 @@ def deliver_email(self, notification_id): raise NoResultFound() send_to_providers.send_email_to_provider(notification) except EmailClientNonRetryableException as e: - current_app.logger.exception(e) + current_app.logger.exception( + f"Email notification {notification_id} failed: {e}" + ) update_notification_status_by_id(notification_id, 'technical-failure') except Exception as e: try: