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

500 error when API auth_token authentication is not sent correctly #62

Closed
jathanism opened this issue Jul 7, 2015 · 0 comments
Closed
Labels

Comments

@jathanism
Copy link
Contributor

For example, a POST to /api/authenticate/ with an empty payload results in:

Stacktrace (most recent call last):

  File "django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "rest_framework/views.py", line 454, in dispatch
    self.response = self.finalize_response(request, response, *args, **kwargs)
  File "rest_framework/views.py", line 374, in finalize_response
    % type(response)
AssertionError: Expected a `Response`, `HttpResponse` or `HttpStreamingResponse` to be returned from the view, but received a `<type 'NoneType'>`

Looks like this related to nsot.api.views.AuthTokenLoginView

@jathanism jathanism added the bug label Jul 7, 2015
gmjosack added a commit that referenced this issue Jul 7, 2015
Fix #62 - 500 error when API authenticate is malformed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant