From 6da552a00b6ef8f2804b2fd3b5ee6211bfb66bf6 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Tue, 3 Jul 2018 09:41:02 +0100 Subject: [PATCH] Added a message before the error description, to explain that it's the input arguments that have caused a problem. --- app/v2/notifications/post_notifications.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/v2/notifications/post_notifications.py b/app/v2/notifications/post_notifications.py index 9e5f6163a..8ab4cd76b 100644 --- a/app/v2/notifications/post_notifications.py +++ b/app/v2/notifications/post_notifications.py @@ -108,7 +108,8 @@ def post_notification(notification_type): try: request_json = request.get_json() except werkzeug.exceptions.BadRequest as e: - raise BadRequestError(message=e.description, status_code=400) + raise BadRequestError(message="Error decoding arguments: {}".format(e.description), + status_code=400) if notification_type == EMAIL_TYPE: form = validate(request_json, post_email_request)