In a simple TokenAuthentication
system in Django Rest Framework, the default message when you fail to send a proper authorization token is this
{
"detail": "Authentication credentials were not provided."
}
I want all my API responses to follow a certain template e.g. { success, message, data }
How can I overwrite this error message?
What is the best practice when creating these API templates?
P.S. I checked out other questions but couldn't find anyone with a similar problem. If it was already answered I'd be glad if you could point me to it.