src/Client.php
private function handleRequestException(HttpClientException $e)
    {
        if ($response = $e->getResponse()) {
            $exception = new Exception($response->getReasonPhrase(), $response->getStatusCode(), $e);
            $exception->setBody(json_decode($response->getBody()));

            throw $exception;
        }

        throw new Exception($e->getMessage(), 500, $e);
    }
private function handleRequestException(HttpClientException $e)
    {
        if ($response = $e->getResponse()) {
            $exception = new Exception($response->getReasonPhrase(), $response->getStatusCode(), $e);
            $exception->setBody(json_decode($response->getBody()));

            throw $exception;
        }

        throw new Exception($e->getMessage(), 500, $e);
    }
private function handleRequestException ( HttpClientException $ e ) { if ( $ response = $ e -> getResponse ( ) ) { $ exception = new Exception ( $ response -> getReasonPhrase ( ) , $ response -> getStatusCode ( ) , $ e ) ; $ exception -> setBody ( json_decode ( $ response -> getBody ( ) ) ) ; throw $ exception ; } throw new Exception ( $ e -> getMessage ( ) , 500 , $ e ) ; }
Handles http client exceptions.

@param    HttpClientException $e

@return   void
@throws   Exception
Handles http client exceptions .