alireza1219 / repair-ninja

MIT License
2 stars 0 forks source link

DRF's nonstandard responses. #6

Open alireza1219 opened 5 months ago

alireza1219 commented 5 months ago

While handling the response errors on the frontend, I've realized that DRF generates a nonstandard response whenever a validation error occurs!

I could find some resources that might be helpful: https://drf-standardized-errors.readthedocs.io/en/latest/quickstart.html https://medium.com/@ali.iqbal028/fixing-the-worst-thing-about-django-rest-framework-982096212156

alireza1219 commented 5 months ago

This needs more review before being applied! I believe that it will negatively affect the API's testcases.

alireza1219 commented 5 months ago

image Here's a screenshot for more clarity.