Scan with no body fails with 500

Bug #1423858 reported by Ajaya Agrawal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MagnetoDB
Triaged
Low
Unassigned

Bug Description

No body in scan request.

Actual error code: 500
Expected: 400

The stack-trace is:
2015-02-20 15:50:50.180 8739 ERROR magnetodb.common.middleware.fault [req-4a7fbe26-1aad-4e2c-929f-06818c408fa1 default_user default_tenant] sca$
() takes exactly 5 arguments (4 given)
Traceback (most recent call last):
  File "/home/aj/stack/magnetodb/magnetodb/common/middleware/fault.py", line 115, in process_request
    return req.get_response(self.application)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/home/aj/stack/magnetodb/magnetodb/common/wsgi.py", line 63, in __call__
    response = req.get_response(self.application)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/home/aj/stack/magnetodb/magnetodb/common/wsgi.py", line 63, in __call__
    response = req.get_response(self.application)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/routes/middleware.py", line 136, in __call__
    response = self.app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
  resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/home/aj/stack/magnetodb/magnetodb/common/wsgi.py", line 246, in __call__
    action_result = self.execute_action(action, request, **action_args)
  File "/home/aj/stack/magnetodb/magnetodb/common/wsgi.py", line 260, in execute_action
    return self.dispatch(self.controller, action, request, **action_args)
  File "/home/aj/stack/magnetodb/magnetodb/common/wsgi.py", line 269, in dispatch
    return method(*args, **kwargs)
  File "/home/aj/stack/magnetodb/magnetodb/api/__init__.py", line 35, in wrapper
    return f(self, *args, **kwargs)
  File "/home/aj/stack/magnetodb/magnetodb/common/probe.py", line 94, in wrapper
    return f(*args, **kwargs)
TypeError: scan() takes exactly 5 arguments (4 given)

Revision history for this message
Andrii Ostapenko (aostapenko) wrote :

Add request please, is body empty or absent?

Changed in magnetodb:
status: New → Incomplete
Revision history for this message
Ajaya Agrawal (ajayaa) wrote :

Tried with both. Didn't work.

description: updated
Changed in magnetodb:
status: Incomplete → Triaged
importance: Undecided → Medium
Revision history for this message
Andrii Ostapenko (aostapenko) wrote :

Scan works with empty body, however we have a bug in python-magnetodbclient. If request file contains '{}' no body is present in request. However scan fails with 500 if no body provided

Changed in magnetodb:
importance: Medium → Low
description: updated
description: updated
Revision history for this message
Andrii Ostapenko (aostapenko) wrote :

Related bug in python-magnetodbclient https://launchpad.net/bugs/1423993

summary: - Scan with no body fails.
+ Scan with no body fails with 500
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.