Handles an install request failure.
197001
protected void handleInstallRequestFailure(MemberState member, InstallRequest request, Throwable error) {
    // Log the failed attempt to contact the member.
    failAttempt(member, error);
  }
254145
protected function processInstall()
    {
        $result = $this->install->process($this->getSubmitted());
        $this->redirect($result['redirect'], $result['message'], $result['severity']);
    }
724822
def handle_error(response):
    """"""
    status_code = response.status_code

    if status_code not in A_OK_HTTP_CODES:
        error_explanation = A_ERROR_HTTP_CODES.get(status_code)
        raise_error = "{}: {}".format(status_code, error_explanation)
        raise Exception(raise_error)
    else:
        return True
1190667
def raise_on_failure(mainfunc):
    """"""
    try:
        errors = mainfunc()
        if errors:
            exit(errors)
    except CalledProcessError as error:
        exit(error.returncode)
    except SystemExit as error:
        if error.code:
            raise
    except KeyboardInterrupt:  # I don't plan to test-cover this.  :pragma:nocover:
        exit(1)
719729
protected function processInstall()
    {
        if (!$this->isError()) {

            $settings = $this->getSubmitted();
            $this->install->connectDb($settings['database']);
            $result = $this->install->process($settings, $this->current_route);

            if ($result['severity'] === 'success') {
                $this->line($result['message']);
            } else {
                $this->error($result['message']);
            }
        }
    }
24628
protected function downloadErrorsDownload()
    {
        $file = $this->install_model->getErrorLogFile();

        if ($this->isQuery('download_errors') && is_file($file)) {
            $this->download($file);
        }
    }
334470
def handle_build_exception(exception):
    
    error('Build failed: {}'.format(exception.message))
    if exception.instructions is not None:
        info('Instructions: {}'.format(exception.instructions))
    exit(1)
1154786
def install?
      s = super
      return s unless s
      fail InstallFailed, 'No source file specified.' if source_path.nil?
      fail InstallFailed, 'No destination specified.' if destination_path.nil?
      true
    end
802111
def handle_request_parsing_error(err, req, schema, error_status_code, error_headers):
    
    abort(error_status_code, errors=err.messages)
1260162
private void requestPermissionForInstallPackage() {
        AndPermission.with(this)
            .runtime()
            .permission(Permission.Group.STORAGE)
            .rationale(new RuntimeRationale())
            .onGranted(new Action<List<String>>() {
                @Override
                public void onAction(List<String> data) {
                    new WriteApkTask(MainActivity.this, new Runnable() {
                        @Override
                        public void run() {
                            installPackage();
                        }
                    }).execute();
                }
            })
            .onDenied(new Action<List<String>>() {
                @Override
                public void onAction(List<String> data) {
                    toast(R.string.message_install_failed);
                }
            })
            .start();
    }
586270
def handle_query_error(msg, query, session, payload=None):
    """"""
    payload = payload or {}
    troubleshooting_link = config['TROUBLESHOOTING_LINK']
    query.error_message = msg
    query.status = QueryStatus.FAILED
    query.tmp_table_name = None
    session.commit()
    payload.update({
        'status': query.status,
        'error': msg,
    })
    if troubleshooting_link:
        payload['link'] = troubleshooting_link
    return payload
944381
def _fail(self, request_id, failure, duration):
        """"""
        self.listeners.publish_command_failure(
            duration, failure, self.name,
            request_id, self.sock_info.address, self.op_id)
1254571
def handleError(self, error_code, message):
        ''''''
        self._fail = True
        self.reason = error_code
        self._error = message
1370448
function handleSuccess() {
  clearOutdatedErrors();

  var isHotUpdate = !isFirstCompilation;
  isFirstCompilation = false;
  hasCompileErrors = false;

  // Attempt to apply hot updates or reload.
  if (isHotUpdate) {
    tryApplyUpdates(function onHotUpdateSuccess() {
      // Only dismiss it when we're sure it's a hot update.
      // Otherwise it would flicker right before the reload.
      tryDismissErrorOverlay();
    });
  }
}
690780
function installCb(err) {
  if (err) {
    console.log(`${C.errorText} ${err.message}`);
    process.exit(1);
  }
  let successMessage = `${C.successText} ${packageName}
  and its peerDeps were installed successfully.`;
  if (program.onlyPeers) {
    successMessage = `${
      C.successText
    } The peerDeps of ${packageName} were installed successfully.`;
  }
  console.log(successMessage);
  process.exit(0);
}
944648
function _failHandler(e){
        $spin.hide()

        if(e.status === 400) alert(e.responseText || 'Bad request.')
        if(e.status === 401) alert(e.responseText || 'Unauthorized request.')
        if(e.status === 402) alert(e.responseText || 'Forbidden request.')
        if(e.status === 403) alert(e.responseText || 'Forbidden request.')
        if(e.status === 404) alert(e.responseText || 'Images were not found.')
        if(e.status === 405) alert(e.responseText || 'That method is not allowed.')
        if(e.status === 408) alert(e.responseText || 'The request timed out. Try again.')
        if(e.status === 500) alert(e.responseText || 'Something went really wrong.')
        
        postData = postUrl = ''
        
        cb & cb()

      }
988051
def handle_fail_rcs(self, req):
        

        try:
            logger.debug("HTTP Status Code: %s", req.status_code)
            logger.debug("HTTP Response Text: %s", req.text)
            logger.debug("HTTP Response Reason: %s", req.reason)
            logger.debug("HTTP Response Content: %s", req.content)
        except:
            logger.error("Malformed HTTP Request.")

        # attempt to read the HTTP response JSON message
        try:
            logger.debug("HTTP Response Message: %s", req.json()["message"])
        except:
            logger.debug("No HTTP Response message present.")

        # handle specific status codes
        if req.status_code >= 400:
            logger.info("Debug Information:\nHTTP Status Code: %s",
                        req.status_code)
            logger.info("HTTP Status Text: %s", req.reason)
            if req.status_code == 401:
                logger.error("Authorization Required.")
                logger.error("Please ensure correct credentials "
                             "in " + constants.default_conf_file)
                logger.debug("HTTP Response Text: %s", req.text)
            if req.status_code == 402:
                # failed registration because of entitlement limit hit
                logger.debug('Registration failed by 402 error.')
                try:
                    logger.error(req.json()["message"])
                except LookupError:
                    logger.error("Got 402 but no message")
                    logger.debug("HTTP Response Text: %s", req.text)
                except:
                    logger.error("Got 402 but no message")
                    logger.debug("HTTP Response Text: %s", req.text)
            if req.status_code == 403 and self.auto_config:
                # Insights disabled in satellite
                rhsm_hostname = urlparse(self.base_url).hostname
                if (rhsm_hostname != 'subscription.rhn.redhat.com' and
                   rhsm_hostname != 'subscription.rhsm.redhat.com'):
                    logger.error('Please enable Insights on Satellite server '
                                 '%s to continue.', rhsm_hostname)
            if req.status_code == 412:
                try:
                    unreg_date = req.json()["unregistered_at"]
                    logger.error(req.json()["message"])
                    write_unregistered_file(unreg_date)
                except LookupError:
                    unreg_date = "412, but no unreg_date or message"
                    logger.debug("HTTP Response Text: %s", req.text)
                except:
                    unreg_date = "412, but no unreg_date or message"
                    logger.debug("HTTP Response Text: %s", req.text)
            return True
        return False