that is bad practice, DO NOT SEND 200 STATUS FOR AN ERROR. How are you to 
know when a request has errored without checking the text?  the status code 
lets you check by number range easily and go from there.  In addition, most 
JS ajax libraries will use the status code to throw errors which are caught 
in the promises.  tl;dr please do not do this.

On Monday, May 7, 2018 at 10:51:17 PM UTC-4, vallabh vyas wrote:
>
> Hi All,
>
> I am new to Django/ Django Rest Framework. I want custom message along 
> with custom error message and status code 200 for ValidationError. 
>
> Error message can be.
>
> 1. Email not found
>
> 2. Wrong password
>
>
> I had asked this question in stack someone had answered also. but i would 
> like to know is there any better way to do that.. below is the stack link
>
>
> https://stackoverflow.com/questions/50214614/drf-custom-serializer-error-fomat/
>
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-rest-framework+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to