src/Operation/AbstractOperation.php
protected static function checkResponse(HttpRequest $request, HttpResponse $response)
    {
        if ($response->getCode() !== 200) {
            throw ExceptionBuilder::fromHttpRequestAndResponse($request, $response);
        }
        return true;
    }
protected static function checkResponse(HttpRequest $request, HttpResponse $response)
    {
        if ($response->getCode() !== 200) {
            throw ExceptionBuilder::fromHttpRequestAndResponse($request, $response);
        }
        return true;
    }
protected static function checkResponse ( HttpRequest $ request , HttpResponse $ response ) { if ( $ response -> getCode ( ) !== 200 ) { throw ExceptionBuilder :: fromHttpRequestAndResponse ( $ request , $ response ) ; } return true ; }
Helper method to throw an exception when an API or HTTP endpoint responds
with a non-200 status code.

@param $request HttpRequest the HTTP request
@param $response HttpResponse the HTTP response to check
@return bool returns true when everything was okay
@throws AbstractHttpException
Helper method to throw an exception when an API or HTTP endpoint responds with a non - 200 status code .