Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request data collection doesn't work in Flask 0.9 #59

Closed
brianr opened this issue May 13, 2015 · 1 comment · Fixed by #61
Closed

Request data collection doesn't work in Flask 0.9 #59

brianr opened this issue May 13, 2015 · 1 comment · Fixed by #61

Comments

@brianr
Copy link
Member

brianr commented May 13, 2015

In Flask 0.9, the call to request.get_json() fails, causing the request data to not be attached. Exception is like this:

ERROR:rollbar:Exception while building request_data for Rollbar payload: AttributeError("'Request' object has no attribute 'get_json'",)
Traceback (most recent call last):
  File "/venv/lib/python2.7/site-packages/rollbar/__init__.py", line 759, in _add_request_data
    request_data = _build_request_data(request)
  File "/venv/lib/python2.7/site-packages/rollbar/__init__.py", line 802, in _build_request_data
    return _build_werkzeug_request_data(actual_request)
  File "/venv/lib/python2.7/site-packages/rollbar/__init__.py", line 981, in _build_werkzeug_request_data
    if request.get_json():
AttributeError: 'Request' object has no attribute 'get_json'

Might be able to fix by calling request.json() instead; need to double-check compatibility.

@philfreo
Copy link

I think you mean request.json instead of request.json()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants