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
Currently, the starter kit returns a bad request exception(400) message details in the following pattern.
"message": [
"name must be a string",
"name should not be empty",
"email must be an email",
"email should not be empty"
],
There is no specification of the field for which the error has occurred. Then how would the frontend know in which field the error message should be displayed? How about returning the error messages like this? Or any better format?
"message": {
"name": [
"name must be a string",
"name should not be empty",
],
"email": [
"email must be an email",
"email should not be empty",
]
}
The text was updated successfully, but these errors were encountered:
{
"messages":[
{
"key":"name",
"errors":[
"name must be a string",
"name should not be empty"
]
},
{
"key":"email",
"errors":[
"email must be an email",
"email should not be empty"
]
}
]
}
Currently, the starter kit returns a bad request exception(
400
) message details in the following pattern.There is no specification of the field for which the error has occurred. Then how would the frontend know in which field the error message should be displayed? How about returning the error messages like this? Or any better format?
The text was updated successfully, but these errors were encountered: