src/AbstractConnection.php
public function checkResponse(ResponseInterface $response)
    {
        if (isset($this->_errorChecker)) {
            $error = call_user_func($this->_errorChecker, $response);
        } else {
            $error = $this->getResponseError($response);
        }

        if ($error) {
            throw new ResponseErrorException($error, $response);
        }
    }
public function checkResponse(ResponseInterface $response)
    {
        if (isset($this->_errorChecker)) {
            $error = call_user_func($this->_errorChecker, $response);
        } else {
            $error = $this->getResponseError($response);
        }

        if ($error) {
            throw new ResponseErrorException($error, $response);
        }
    }
public function checkResponse ( ResponseInterface $ response ) { if ( isset ( $ this -> _errorChecker ) ) { $ error = call_user_func ( $ this -> _errorChecker , $ response ) ; } else { $ error = $ this -> getResponseError ( $ response ) ; } if ( $ error ) { throw new ResponseErrorException ( $ error , $ response ) ; } }
Checks response method and raises exception if error found.
@param ResponseInterface $response response data from API
@throws ResponseErrorException when response is invalid
Checks response method and raises exception if error found .