From cdaa50c4d3521574cb9fe449ec84a8beeaf77edc Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Fri, 20 Nov 2015 11:06:30 +0000 Subject: [PATCH] addAnnotations: report which key is missing in error --- pandora/annotation/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora/annotation/views.py b/pandora/annotation/views.py index 2cc039c3..27bbb1fc 100644 --- a/pandora/annotation/views.py +++ b/pandora/annotation/views.py @@ -220,8 +220,9 @@ def addAnnotations(request, data): ''' for key in ('item', 'layer', 'annotations'): if key not in data: - return render_to_json_response(json_response(status=400, - text='invalid data')) + return render_to_json_response(json_response( + status=400, + text='invalid data (missing "{}")'.format(key))) item = get_object_or_404_json(Item, public_id=data['item'])