Handler Response API

Hi guys

I have one API that return a structure if the response is success, but if the response is failed he return errors.
How can pick this when the API just return the fields if the response is success.

Bad Response.
{
“errors”: [
{
“error”: “Load date must be on or after 2023-05-24 17:46:29”
}
]
}