Add better logging message for tech failure

So we can easily identify which notification ID failed
This commit is contained in:
David McDonald
2020-12-30 17:28:21 +00:00
parent 2480f91667
commit 977554781f

View File

@@ -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: