From 2d3364d94609bc46896bf8c82de0c61b57049863 Mon Sep 17 00:00:00 2001 From: Martyn Inglis Date: Fri, 11 Mar 2016 08:37:04 +0000 Subject: [PATCH] Fixing import path to JSON decode exception --- app/notifications/rest.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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"