Mailgun\Connection\RestClient::getResponseExceptionMessage PHP Метод

getResponseExceptionMessage() защищенный Метод

protected getResponseExceptionMessage ( Psr\Http\Message\ResponseInterface $responseObj ) : string
$responseObj Psr\Http\Message\ResponseInterface
Результат string
    protected function getResponseExceptionMessage(ResponseInterface $responseObj)
    {
        $body = (string) $responseObj->getBody();
        $response = json_decode($body);
        if (json_last_error() == JSON_ERROR_NONE && isset($response->message)) {
            return ' ' . $response->message;
        }
        return '';
    }