jpadilla / django-rest-framework-jwt

JSON Web Token Authentication support for Django REST Framework
http://jpadilla.github.io/django-rest-framework-jwt/
MIT License
3.19k stars 652 forks source link

modified exception validation in serializer #392

Open dwisulfahnur opened 7 years ago

dwisulfahnur commented 7 years ago

I modified errors format in serializer authentication process. from using serializers exception (serializers.ValidationError(msg)) to using rest_framework exception (exceptions.AuthenticationFailed(msg))

{"detail": "msg error"} it will give an error message that more readable than {"non_field_errros":["msg error"]}