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",
]
}
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?