You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've reviewed the entire 'router API,' and it appears that the only difference is the way password length is returned.
Regarding the password issue, I believe that the front-end should check the password length before sending it to the back-end. This way, the front-end won't encounter password length errors.
Actually, the reason field could take whatever value, since you can implement custom password validation rules. So it might not be only a matter of password length.
I agree that it's not very good that it's the only place that breaks the convention for returning error. The right way would be to always nest the error code inside an object, so it gives us flexibility to implement specific things like password validation while still maintaining a common schema.
For example on the register endpoint:
Why do we have a detail which is a string, and a detail which is an object?
Consuming this on the frontend is harder because this is not consistent.
The text was updated successfully, but these errors were encountered: