I want to know how can we return error/success custom response in Django rest instead of serializer response. For example I want to return the response in the following format
{
'status':'Error',
'reson':'Reason'
}
whereas serializer return errors as in the following format
{'username': ['This field is required.'],
'password': ['This field must be at least 8 chars'],
'email': ['This field cannot be blank']
}
How to customize this error response? Please help. Thanks in advance.