Added a way to handle complaint responses from SES.

At this point we are just logging the message so that we can confirm the contents of the SES message.

refer to: https://www.pivotaltracker.com/story/show/157969699
This commit is contained in:
Rebecca Law
2018-05-30 16:16:36 +01:00
parent 9fcfcd5127
commit e82fa2c8d4
2 changed files with 26 additions and 0 deletions

View File

@@ -38,6 +38,10 @@ def process_ses_response(ses_request):
notification_type = ses_message['bounce']['bounceType'] # permanent or not
else:
notification_type = 'Temporary'
if notification_type == 'Complaint':
current_app.logger.info("Complaint from SES: \n{}".format(ses_message))
return
try:
aws_response_dict = get_aws_responses(notification_type)
except KeyError: