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

Return 400 instead of 500/404? #12

Closed
mmoravcik opened this issue Oct 17, 2018 · 3 comments
Closed

Return 400 instead of 500/404? #12

mmoravcik opened this issue Oct 17, 2018 · 3 comments
Assignees

Comments

@mmoravcik
Copy link

Any reason why the app return 500/404 error instead of 400 in these, and perhaps other, cases?

  • non-existent email address has been provided
  • token is invalid (expired, deleted, mistyped)

I think that catching 400 and getting the errors from the response would be much neater to work with in FE?

@anx-ckreuzberger
Copy link
Contributor

anx-ckreuzberger commented Oct 18, 2018

I have always "caught" that behaviour in a custom exception handler of django rest framework, but I'll take a look at what can be done within the package.

edit: But it should never return a 500 anyway :)

@anx-ckreuzberger
Copy link
Contributor

I've created issue #19 for this and closing this one.

@anx-ckreuzberger
Copy link
Contributor

Changes for this have just released in Version 1.0.0a1.

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

No branches or pull requests

2 participants