SO I think I am having a brain fart, I am trying to get the values for these three different error responses.
message validation
{
"errors": [
{
"message": "Validation failed for the field [confirmAppointment].",
"extensions": {
"validation": {
"input.birth_date": [
"The input.birth date must be a date before today."
]
},
"category": "validation"
},
"locations": [
{
"line": 1,
"column": 11
}
],
"path": [
"confirmAppointment"
]
}
],
"data": {
"confirmAppointment": null
}
}
I get this response during an axios catch, id like to display this msg back to the user during validation, however, I think I am having a brain fart.
So far I tried this:
let result = err.response.data.errors.extensions.map(a => a);
This gives me the array of object
any Ideas?