Bad response status on query with non existent table_name

Bug #1299884 reported by Andrii Ostapenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MagnetoDB
Fix Released
High
Andrii Ostapenko

Bug Description

2014-03-30 22:39:03,263 Request: POST http://localhost:8480/v1/default_tenant/data/tables/non_existent_table/query
2014-03-30 22:39:03,264 Request Headers: {'Content-Type': 'application/json', 'Accept': 'application/json'}
2014-03-30 22:39:03,264 Request Body: {"consistent_read": true, "key_conditions": {"forum": {"attribute_value_list": [{"S": "forum1"}], "comparison_operator": "EQ"}, "subject": {"attribute_value_list": [{"S": "subject"}], "comparison_operator": "BEGINS_WITH"}}}
2014-03-30 22:39:03,268 Response Status: 500
2014-03-30 22:39:03,269 Response Headers: {'date': 'Sun, 30 Mar 2014 19:39:03 GMT', 'content-length': '149', 'content-type': 'application/x-amz-json-1.0'}
2014-03-30 22:39:03,269 Response Body: {"__type":"com.amazonaws.dynamodb.v20111205#InternalServerError","message":"The server encountered an internal error trying to fulfill the request."}

On server side:
2014-03-30 22:39:03.266 2517 DEBUG routes.middleware [-] Matched POST /v1/default_tenant/data/tables/non_existent_table/query __call__ /usr/local/lib/python2.7/dist-packages/routes/middleware.py:100
2014-03-30 22:39:03.266 2517 DEBUG routes.middleware [-] Route path: '/v1/{project_id}/data/tables/{table_name}/query', defaults: {'action': u'query', 'controller': <magnetodb.common.wsgi.Resource object at 0x22e6790>} __call__ /usr/local/lib/python2.7/dist-packages/routes/middleware.py:102
2014-03-30 22:39:03.266 2517 DEBUG routes.middleware [-] Match dict: {'action': u'query', 'controller': <magnetodb.common.wsgi.Resource object at 0x22e6790>, 'project_id': u'default_tenant', 'table_name': u'non_existent_table'} __call__ /usr/local/lib/python2.7/dist-packages/routes/middleware.py:103

Expected status: 404

Changed in magnetodb:
importance: Undecided → High
milestone: none → 2.0.4
Changed in magnetodb:
status: New → Fix Committed
Changed in magnetodb:
assignee: nobody → Andrei V. Ostapenko (aostapenko)
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.