Checks the response to see if there were any errors specific to
        this WSDL.
495846
def _check_response_for_request_errors(self):
        
        if self.response.HighestSeverity == "ERROR":  # pragma: no cover
            for notification in self.response.Notifications:
                if notification.Severity == "ERROR":
                    if "Invalid tracking number" in notification.Message:
                        raise FedexInvalidTrackingNumber(
                                notification.Code, notification.Message)
                    else:
                        raise FedexError(notification.Code, notification.Message)
741635
public function checkResponse()
    {
        if (!isset($this->order_ref)) {
            $this->errorMessage[] = 'CHECK RESPONSE: Missing order_ref variable!';
            return false;
        }
        $this->logFunc("BackRef", $this->getData, $this->order_ref);

        if (!$this->checkCtrl()) {
            $this->errorMessage[] = 'CHECK RESPONSE: INVALID CTRL!';
            return false;
        }

        $ios = new SimpleIos($this->iosConfig, $this->getData['order_currency'], $this->order_ref);

        foreach ($ios->errorMessage as $msg) {
            $this->errorMessage[] = $msg;
        }
        foreach ($ios->debugMessage as $msg) {
            $this->debugMessage[] = $msg;
        }

        if (is_object($ios)) {
            $this->checkIOSStatus($ios);
        }
        $this->logFunc("BackRef_BackStatus", $this->backStatusArray, $this->order_ref);
        if (!$this->checkRtVariable($ios)) {
            return false;
        }
        if (!$this->backStatusArray['RESULT']) {
            return false;
        }
        return true;
    }
268212
def _check_for_errors(response, json_response):
        
        status_code = response.status_code
        try:
            response.raise_for_status()
        except requests.HTTPError as why:
            raise ApiError(str(why), reply_code=status_code)
        if isinstance(json_response, dict) and 'error' in json_response:
            raise ApiError(json_response['error'], reply_code=status_code)
1084380
public function isValidSOAPMethod()
    {
        if (!in_array(Splash::configuration()->WsMethod, array('SOAP', 'NuSOAP'), true)) {
            return Splash::log()->err(
                'Config : Your selected an unknown SOAP Method ('.Splash::configuration()->WsMethod.').'
            );
        }

        return Splash::log()->msg(
            'Config : SOAP Method is Ok ('.Splash::configuration()->WsMethod.').'
        );
    }
133700
def _check_error(response):
        """"""
        if 'error' in response:
            raise InfluxDBError(response['error'])
        elif 'results' in response:
            for statement in response['results']:
                if 'error' in statement:
                    msg = '{d[error]} (statement {d[statement_id]})'
                    raise InfluxDBError(msg.format(d=statement))
129253
def check_response(res):
    
    try:
        res.raise_for_status() # Alternative is res.ok
    except Exception as exc:
        # Bad response code, e.g. if adding an edge with nodes that doesn't exist
        try:
            err_info = res.json()
            err_msg = err_info['message'] # or 'localizeMessage'
        except ValueError:
            err_msg = res.text[:40] # Take the first 40 chars of the response
        except KeyError:
            err_msg = res.text[:40] + ("(No 'message' in err_info dict: %s"
                                       % list(err_info.keys()))
        exc.args += (err_msg,)
        raise exc
366601
function checkResponse(actual, expected, bindings) {

    debug('Checking response, expecting:', expected)

    addTest('Status: ' + expected.title, function() {
      assert.equal(actual.statusCode, expected.code)
    })

    for (var key in expected.headers) {
      var val = expected.headers[key]
      addTest('Header: ' + key + ': ' + val, function() {
        assert.ok(actual.headers[key], "Header " + key + " expected, but not found")
        assert.ok(interpolate.match(actual.headers[key], val, bindings), "Expected headers to match")
      })
    }

    if (expected.body) {
      assertBodyMatches(actual.body, expected.body, bindings)
    } else {
      addTest('No body', function() {
        if (actual.body) assert.fail(actual.body, '', "Expected empty body")
      })
    }
  }
342551
def _check_error_response(response, query):
        
        if "error" in response:
            http_error = ["HTTP request timed out.", "Pool queue is full"]
            geo_error = [
                "Page coordinates unknown.",
                "One of the parameters gscoord, gspage, gsbbox is required",
                "Invalid coordinate provided",
            ]
            err = response["error"]["info"]
            if err in http_error:
                raise HTTPTimeoutError(query)
            elif err in geo_error:
                raise MediaWikiGeoCoordError(err)
            else:
                raise MediaWikiException(err)
110867
def check():
    
    t = time.time()
    results = Client(BASE_URL).version()
    print("Endpoint", BASE_URL)
    print("Response Time %0.2f" % (time.time() - t))
    print("Headers")
    for k, v in results.headers.items():
        print(" %s: %s" % (k, v))
    print("Body")
    print(results.text)
1167120
private boolean isValid(String response, List<String> options) {

		boolean rslt = false;	// default...

		if (options.size() == 0) {
			// If no acceptable responses are specified, it's wide open...
			rslt = true;
		} else {
			for (String o : options) {
				if (response.matches(o)) {
					rslt = true;
					break;
				}
			}
		}
		
		return rslt;
		
	}
1213832
def check_response(res, options)
      if res.status >= 200 && res.status <= 299
        if(options[:mashify] && res.body.instance_of?(Hash))
          Hashie::Mash.new(res.body)
        else
          res.body
        end
      elsif [404, 410].include? res.status
        err_str = "Error processing request: (#{res.status})! #{res.env[:method]} URL: #{res.env[:url]}"
        err_str << "\n Resp Body: #{res.body}"
        raise RequestError::NotFound.new(res), err_str
      else
        err_str = "Error processing request (#{res.status})! #{res.env[:method]} URL: #{res.env[:url]}"
        err_str << "\n Resp Body: #{res.body}"
        raise RequestError.new(res), err_str
      end
    end
42798
def check_api_response(self, response):
        
        # check response
        if response.status_code == 200:
            return True
        elif response.status_code >= 400:
            logging.error(
                "{}: {} - {} - URL: {}".format(
                    response.status_code,
                    response.reason,
                    response.json().get("error"),
                    response.request.url,
                )
            )
            return False, response.status_code
1222961
def check_response(self, resp):
        

        # For successful API call, response code will be 200 (OK)
        if resp.ok:
            json = resp.json()
            self.response = ResponseHolder()
            self.response.response = json

            # Check the code
            if 'status' not in json:
                raise InvalidResponse('No status field')

            self.response.status = self.field_to_long(json['status'])
            if self.response.status != EBConsts.STATUS_OK:
                txt_status = self.get_text_status(json)
                raise InvalidStatus('Status is %s (%04X)'
                                    % (txt_status if txt_status is not None else "", self.response.status))

            if self.response_checker is not None:
                self.response_checker(self.response)

            return self.response

        else:
            # If response code is not ok (200), print the resulting http error code with description
            resp.raise_for_status()
        pass
489447
protected function analyzeResponseErrors()
    {
        $content = $this->content;

        if ($content && property_exists($content, 'errors')) {
            $this->setErrors($content, 'errors');
        } elseif ($content && property_exists($content, 'ERROR')) {
            $this->setError('Unknown', $content->ERROR);
        }

        $this->throwExceptions();
    }
57147
def _check_response_status(self, response):
        
        if response.status_code != requests.codes.ok:
            self._logger.error("%s %s", response.status_code, response.text)
            raise exceptions.RequestNonSuccessException(
                "Url {0} had status_code {1}".format(
                    response.url, response.status_code))
66996
boolean isErrorResponse(HttpResponse response) {
        StatusLine status = response.getStatusLine();
        if (status == null || status.getStatusCode() != 200) {
            return true;
        }
        return false;
    }
926956
def check_errors(self, data):
        """"""

        if (type(data) == dict and 'status' in data.keys()
            and data['status'] == 'failed'):
            if data.get('exception_msg') and 'last_id' in data.get('exception_msg'):
                raise PyBossaServerNoKeysetPagination
            else:
                raise Error(data)
        return False