mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-07 11:14:39 -05:00
Remove email from the log message
This commit is contained in:
@@ -35,6 +35,7 @@ def process_ses_response(ses_request):
|
||||
if notification_type == 'Bounce':
|
||||
notification_type = determine_notification_bounce_type(notification_type, ses_message)
|
||||
elif notification_type == 'Complaint':
|
||||
remove_emails_from_complaint(ses_message)
|
||||
current_app.logger.info("Complaint from SES: \n{}".format(ses_message))
|
||||
return
|
||||
|
||||
@@ -105,6 +106,10 @@ def remove_emails_from_bounce(bounce_dict):
|
||||
recip.pop('emailAddress')
|
||||
|
||||
|
||||
def remove_emails_from_complaint(complaint_dict):
|
||||
complaint_dict['complaint'].pop('complainedRecipients')
|
||||
|
||||
|
||||
def _check_and_queue_callback_task(notification):
|
||||
# queue callback task only if the service_callback_api exists
|
||||
service_callback_api = get_service_callback_api_for_service(service_id=notification.service_id)
|
||||
|
||||
Reference in New Issue
Block a user