private function throwExceptionOnHttpErrors(Response $response)
    {
        $httpCode = $response->getHttpCode();

        if ($httpCode >= 400)
        {
            // Get the description of the http error code
            $httpMessage = $response->getHttpMessage($httpCode);

            throw new HttpException($response, $httpMessage, $httpCode);
        }
    }
private function throwExceptionOnHttpErrors(Response $response)
    {
        $httpCode = $response->getHttpCode();

        if ($httpCode >= 400)
        {
            // Get the description of the http error code
            $httpMessage = $response->getHttpMessage($httpCode);

            throw new HttpException($response, $httpMessage, $httpCode);
        }
    }
private function throwExceptionOnHttpErrors ( Response $ response ) { $ httpCode = $ response -> getHttpCode ( ) ; if ( $ httpCode >= 400 ) { // Get the description of the http error code $ httpMessage = $ response -> getHttpMessage ( $ httpCode ) ; throw new HttpException ( $ response , $ httpMessage , $ httpCode ) ; } }
Check for any HTTP response errors

@param Response $response

@return void
@throws HttpException
Check for any HTTP response errors