From e353a058e090173fbfd9f5efcd6b338d8685f738 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Thu, 7 Jun 2018 10:36:04 +0100 Subject: [PATCH] We'd like to see what the bounce message is from SES. If there is a bounce we update the email to failed. However, there is more than one reason for the failed message. Adding this logging will give us more details about the failure message. --- app/notifications/notifications_ses_callback.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/notifications/notifications_ses_callback.py b/app/notifications/notifications_ses_callback.py index 9cfd80bbd..962aaf482 100644 --- a/app/notifications/notifications_ses_callback.py +++ b/app/notifications/notifications_ses_callback.py @@ -95,7 +95,8 @@ def process_ses_response(ses_request): def determine_notification_bounce_type(notification_type, ses_message): - current_app.logger.info('SES bounce dict: {}'.format(remove_emails_from_bounce(ses_message['bounce']))) + remove_emails_from_bounce(ses_message['bounce']) + current_app.logger.info('SES bounce dict: {}'.format(ses_message['bounce'])) if ses_message['bounce']['bounceType'] == 'Permanent': notification_type = ses_message['bounce']['bounceType'] # permanent or not else: