[Answered ]-JWT: How do I implement my custom error message on password or username is wrong Django REST

1👍

If you only need to change the default error message, override the TokenObtainSerializer default_error_message dictionary, and customize the no_active_account key.

Source code: here

to

class CustomTokenObtainSerializer(TokenObtainPairSerializer):
    default_error_messages = {
        'no_active_account': 'Username or Password does not matched.'
    }

Leave a comment