src/Requests/BaseRequest.php
protected function handleResponse(ResponseInterface $response)
    {
        $responseWrapper = new Response($response);
        $statusCode = (int) floor($response->getStatusCode() / 100);

        if ($statusCode === 4) {
            throw new ClientException($responseWrapper);
        } elseif ($statusCode === 5) {
            throw new ServerException($responseWrapper);
        }

        return $responseWrapper;
    }
protected function handleResponse(ResponseInterface $response)
    {
        $responseWrapper = new Response($response);
        $statusCode = (int) floor($response->getStatusCode() / 100);

        if ($statusCode === 4) {
            throw new ClientException($responseWrapper);
        } elseif ($statusCode === 5) {
            throw new ServerException($responseWrapper);
        }

        return $responseWrapper;
    }
protected function handleResponse ( ResponseInterface $ response ) { $ responseWrapper = new Response ( $ response ) ; $ statusCode = ( int ) floor ( $ response -> getStatusCode ( ) / 100 ) ; if ( $ statusCode === 4 ) { throw new ClientException ( $ responseWrapper ) ; } elseif ( $ statusCode === 5 ) { throw new ServerException ( $ responseWrapper ) ; } return $ responseWrapper ; }
Handle response returned by Guzzle

@param ResponseInterface $response
@return Response
@throws ClientException if status code starts with 4
@throws ServerException if status code starts with 5
Handle response returned by Guzzle