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

Fix Live provider (use POST instead of GET to avoid stacktrace). #155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

antoineleclair
Copy link

I was getting this stack trace when using Microsoft Live:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/pyramid_debugtoolbar/toolbar.py", line 215, in toolbar_tween
    response = _handler(request)
  File "/usr/local/lib/python3.5/site-packages/pyramid_debugtoolbar/panels/performance.py", line 57, in resource_timer_handler
    result = handler(request)
  File "/usr/local/lib/python3.5/site-packages/pyramid/tweens.py", line 51, in excview_tween
    request_iface=request_iface.combined
  File "/usr/local/lib/python3.5/site-packages/pyramid/view.py", line 547, in _call_view
    response = view_callable(context, request)
  File "/usr/local/lib/python3.5/site-packages/pyramid/viewderivers.py", line 512, in csrf_view
    return view(context, request)
  File "/usr/local/lib/python3.5/site-packages/pyramid/viewderivers.py", line 413, in viewresult_to_response
    result = view(context, request)
  File "/usr/local/lib/python3.5/site-packages/pyramid/tweens.py", line 22, in excview_tween
    response = handler(request)
  File "/usr/local/lib/python3.5/site-packages/pyramid_tm/__init__.py", line 101, in tm_tween
    reraise(*exc_info)
  File "/usr/local/lib/python3.5/site-packages/pyramid_tm/compat.py", line 15, in reraise
    raise value
  File "/usr/local/lib/python3.5/site-packages/pyramid_tm/__init__.py", line 83, in tm_tween
    response = handler(request)
  File "/usr/local/lib/python3.5/site-packages/pyramid/router.py", line 127, in handle_request
    root = root_factory(request)
  File "/usr/local/lib/python3.5/site-packages/velruse/providers/live.py", line 107, in callback
    r.status_code, r.content))
velruse.exceptions.ThirdPartyFailure: Status 400: b'{"error":"invalid_request","error_description":"The provided request must be sent using the HTTP \'POST\' method."}'

Changing that request to a POST fixed the issue.

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 this pull request may close these issues.

1 participant