We need to replace the Http\Client\Exception\HttpException in IBM\Watson\Core\Client\ExceptionHandler:handle with a more specific exception.
Watson error responses are usually in the format:
{
"error": "General description of an error.",
"errors": [
{
"message": "Description of a specific constraint violation.",
"path": "The location of the constraint violation."
}
],
"code": 500
}
We need to replace the
Http\Client\Exception\HttpException
inIBM\Watson\Core\Client\ExceptionHandler:handle
with a more specific exception.Watson error responses are usually in the format: