cello
cello copied to clipboard
Fix wrong username/password be shown as session expired
According to rest_framework/views.py of django-rest-framework, AuthenticationFailed is actaully be handled as 401 not 400.
This commit moves login failure handler from 400 to 401, so that the dashboard can show the right message.
As for 400 errors, they will be handled as general exceptions.