Hey how can i customize response of validation in DRF response
DRF gives below response on invalid JWT Token
{
"detail": "Given token not valid for any token type",
"code": "token_not_valid",
"messages": [
{
"token_class": "AccessToken",
"token_type": "access",
"message": "Token is invalid or expired"
}
]
}
But i wanna customize it in my way like
'status': False,
'responseCode': 0,
'message': 'Customized error messages ',
'data': {}
I hope a good soul will help meβ¦