diff --git a/app/notifications/rest.py b/app/notifications/rest.py index 422fd201b..cf2344d52 100644 --- a/app/notifications/rest.py +++ b/app/notifications/rest.py @@ -1,5 +1,4 @@ from datetime import datetime -from json import JSONDecodeError import uuid from flask import ( @@ -11,6 +10,8 @@ from flask import ( json ) +from json.decoder import JSONDecodeError + from utils.template import Template from app.clients.sms.firetext import firetext_response_status from app.clients.email.aws_ses import ses_response_status @@ -91,8 +92,8 @@ def process_ses_response(): ), 400 except JSONDecodeError as ex: - current_app.logger.error( - "SES callback failed: invalid json" + current_app.logger.exception( + "SES callback failed: invalid json {}".format(ex) ) return jsonify( result="error", message="SES callback failed: invalid json"