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
When failed updating User instance we may receive an error response
{first_name:['Min length is 2 characters']}
This is default behaviour in Django Rest Framework and I assume in many more.
Is there any way to deserialise error response, so when we get the error data object in the application we work with internal keys (firstName) instead of API keys (first_name)?
The text was updated successfully, but these errors were encountered:
Usually when using JSON REST API error response contain dictionary where keys are the same as model's keys, but values are error messages.
For example
When failed updating User instance we may receive an error response
This is default behaviour in Django Rest Framework and I assume in many more.
Is there any way to deserialise error response, so when we get the error data object in the application we work with internal keys (firstName) instead of API keys (first_name)?
The text was updated successfully, but these errors were encountered: