mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 23:41:17 -05:00
Added a message before the error description, to explain that it's the input arguments that have caused a problem.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user