This closure handles the response from the condition function
427018
function __chain_inner(result) {
		var args = slice.call(arguments, 1);
		nextTick(function() {
			try {
				if (result) {
					var params = that.handle_args(env, that.if_true, args);
					params.unshift(env, after);
					env._fm.$push_call(helpers.fname(that.if_true, that.if_true.fn.name));
					that.if_true.fn.apply(null, params);
				}
				else {
					var params = that.handle_args(env, that.if_false, args);
					params.unshift(env, after);
					env._fm.$push_call(helpers.fname(that.if_false, that.if_false.fn.name));
					that.if_false.fn.apply(null, params);
				}
			}
			catch (e) {
				env.$throw(e);
			}
		});
	}
478990
async def _response_handler(self):
        """"""
        if self.debug is True:
            if self.debug is True:
                print("listenning response!")
        while True:
            try:
                res = await self.reader.readuntil(self.SEPARATOR)
            except:
                raise
            else:
                response = self.decoder(res)
                self._status_code_check(response)
774422
def handleIncomingReply(self, observer_name, reqId, frm, result,
                            numReplies):
        
        preparedReq = self._prepared.get((result[IDENTIFIER], reqId))
        if not preparedReq:
            raise RuntimeError('no matching prepared value for {},{}'.
                               format(result[IDENTIFIER], reqId))
        typ = result.get(TXN_TYPE)
        if typ and typ in self.replyHandler:
            self.replyHandler[typ](result, preparedReq)
267780
function handleReset(req, res, next) {
		var p = new Promise(function (resolve, reject) {
			const currentToken = req.params.token || 'missing';
			const email = req.params.email || 'missing@email.com';
			const password = req.params.password;
			if (!password) {
				return reject(new restifyErrors.BadRequestError("New password is missing"));
			}
			const qry = {
				local_auth_type: 'password',
				active: true,
				email: email,
				verify_token: currentToken
			};
			AclUser.findOne(qry, function (err, usr) {
				if (err) {
					debug(`Error finding user for password reset`, err);
					return reject(new restifyErrors.InternalError(err));
				}
				if (!usr) {
					debug(`Password reset email address and reset token did not match`, email);
					return reject(new restifyErrors.InvalidCredentialsError("Email address and reset token did not match"));
				}
				usr.verify_token = "password-reset:" + usr.generateVerifyHash();
				usr.modifiedBy = 'password-reset';

				debug(`Updating ${email} with a password reset`);
				usr.setPassword(password, function () {
					usr.save(function (err, user) {
						if (err) {
							debug(`Error updating user during password reset`, err);
							return reject(new restifyErrors.InternalError(err));
						}
						const data = {
							'success': true,
							'message': "Password updated"
						};
						resolve(data);
					});
				});
			});
		}).then(function (data) {
			res.json(data);
			next();
		}).catch(function (err) {
			debug(`Password reset request failed`, err);
			next(err);
		});
	}
179993
function checkResponse(err, data) {
		if (err) {
			return callback(err);
		}

		responseParser.parse(data,
			{ format: this.format, logger: this.logger }, getTokens);
		function getTokens(err, tokenResponse) {
			var accessToken, accessSecret;

			if (err) {
				return callback(err);
			}

			return callback();
		}
	}
323073
def _server_response_handler(self, response: Dict[str, Any]):
        
        code = response.get("CODE")
        if code == 100:
            if self.debug:
                print("auth succeed")
            self._login_fut.set_result(response)
        if code == 101:
            if self.debug:
                print('pong')
        return True
604096
function(err, res) {
	      console.log(err);
	      res.reply(mInstance.conf.CONST.ERR);
	      return;
	    }
1112214
def handle_response(self, content, target=None, single_result=True, raw=False):
        
        response = content['response']

        self.check_errors(response)

        data = response.get('data')

        if is_empty(data):
            return data
        elif is_paginated(data):
            if 'count' in data and not data['count']:
                # Response is paginated, but is empty
                return data['data']
            data = data['data']

        if raw:
            return data
        return self.init_all_objects(data, target=target, single_result=single_result)
562424
function (condition) {
            var index = this.length;
            while (index--) {
                var item = this.raw[index];
                if (condition(item)) {
                    return item;
                }
            }
        }
61043
def regex_condition(func):
    
    @wraps(func)
    def regex_condition_wrapper(condition, *args, **kwargs):
        if isinstance(condition, string_types):
            condition = maybe | partial(re.match, condition)
        return func(condition, *args, **kwargs)
    return regex_condition_wrapper
59481
function(err, res) {
        if (err) return callback(err);
        self._rawResponse = res;
        if (!res || !res['cps:reply']) return callback(new Error("Invalid reply"));
        self.seconds = res['cps:reply']['cps:seconds'];
        if (res['cps:reply']['cps:content']) {
            var content = res['cps:reply']['cps:content'];
            self = _.merge(self, content);
        }

        callback(res['cps:reply']['cps:error'], self);
    }
5619
function handleServerResponse(err, server) {
  if (err) {
    console.dir(err);
    return;
  }

  console.log('SERVER CREATED: ' + server.name + ', waiting for active status');

  // Wait for status: ACTIVE on our server, and then callback
  server.setWait({ status: server.STATUS.running }, 5000, function (err) {
    if (err) {
      console.dir(err);
      return;
    }

    console.log('SERVER INFO');
    console.log(server.name);
    console.log(server.status);
    console.log(server.id);

    console.log('Make sure you DELETE server: ' + server.id +
      ' in order to not accrue billing charges');
  });
}
370115
function whenDone (val, fn) {
  if (isPromise(val)) {
    return val.done(fn);
  } else {
    return fn(val);
  }
}
618453
def handle_call_response(self, result, node):
        
        if not result[0]:
            log.warning("no response from %s, removing from router", node)
            self.router.remove_contact(node)
            return result

        log.info("got successful response from %s", node)
        self.welcome_if_new(node)
        return result
305361
function handleErrors(errorFormatter, response) {
  if (!response.ok) {
    if (errorFormatter) {
      return errorFormatter(response);
    }

    return defaultErrorFormatter(response);
  }
  return response;
}
140549
function onServerPreResponseHandler (ctx, err, value) {
  // check if an error was already wrapped
  if (ctx._response.error) {
    ctx.emit('serverResponseError', ctx._response.error);
    ctx.log.error(ctx._response.error);
  } else if (err) { // check for an extension error
    if (err instanceof SuperError) {
      ctx._response.error = err.rootCause || err.cause || err;
    } else {
      ctx._response.error = err;
    }
    const internalError = new Errors.MostlyError(
        Constants.EXTENSION_ERROR, ctx.errorDetails).causedBy(err);
    ctx.log.error(internalError);

    ctx.emit('serverResponseError', ctx._response.error);
  }

  // reply value from extension
  if (value) {
    ctx._response.payload = value;
  }

  // create message payload
  ctx._buildMessage();

  // indicates that an error occurs and that the program should exit
  if (ctx._shouldCrash) {
    // only when we have an inbox othwerwise exit the service immediately
    if (ctx._replyTo) {
      // send error back to callee
      return ctx._transport.send(ctx._replyTo, ctx._message, () => {
        // let it crash
        if (ctx._config.crashOnFatal) {
          ctx.fatal();
        }
      });
    } else if (ctx._config.crashOnFatal) {
      return ctx.fatal();
    }
  }

  // reply only when we have an inbox
  if (ctx._replyTo) {
    return ctx._transport.send(ctx._replyTo, ctx._message);
  }
}
682720
function handleResponseError(error) {
    console.error('handleResponseError', error)
    let reason
    const status = error.response.status

    if (status === 404) {
        reason = wrap('接口不存在')
    } else {
        reason = wrap(defaultErrorMessage)
    }

    return reason
}