iMerica / dj-rest-auth

Authentication for Django Rest Framework
https://dj-rest-auth.readthedocs.io/en/latest/index.html
MIT License
1.67k stars 311 forks source link

Is there a way to make the registration responses consistent with others? #447

Closed Routhinator closed 1 year ago

Routhinator commented 1 year ago

With DRF endpoints, we get errors and responses in an object that contains a detail key

{ "detail": "error" }

However not with the registration endpoints. I'm seeing what should be the contents of the detail key returned as the top level object:

{"password1":["This password is too short. It must contain at least 8 characters.","This password is too common."]}

Is there a way to wrap this output so we can normalize the api responses?

Routhinator commented 1 year ago

Never mind, I've recalled that this is somewhat standard with validation errors.