Hello, thank you for this great article. But when I've tested this uri: /api/auth/forgot with unknown email got error 500 InternalServerError. So I've updated exception handling unknown e-mail address to:
except User.DoesNotExist: raise EmailDoesnotExistsError
Is the update in file reset_password.py correct? Seems to be, because now I'm getting error 400 instead of 500
But still wondering about casdade of errors before this one is rised. Is there better way to handle it?
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hello, thank you for this great article. But when I've tested this uri: /api/auth/forgot with unknown email got error 500 InternalServerError.
So I've updated exception handling unknown e-mail address to:
Is the update in file reset_password.py correct? Seems to be, because now I'm getting error 400 instead of 500
But still wondering about casdade of errors before this one is rised. Is there better way to handle it?