MCPcopy Index your code
hub / github.com/QLHazyCoder/FlowPilot / finalizeDeferredStepExecutionError

Function finalizeDeferredStepExecutionError

background.js:4484–4501  ·  view source on GitHub ↗
(step, error)

Source from the content-addressed store, hash-verified

4482}
4483
4484async function finalizeDeferredStepExecutionError(step, error) {
4485 const latestState = await getState();
4486 const currentStatus = latestState.stepStatuses?.[step];
4487 if (currentStatus === 'completed' || currentStatus === 'failed' || currentStatus === 'stopped') {
4488 return;
4489 }
4490
4491 if (isStopError(error)) {
4492 await setStepStatus(step, 'stopped');
4493 await addLog(`步骤 ${step} 已被用户停止`, 'warn');
4494 await appendManualAccountRunRecordIfNeeded(`step${step}_stopped`, latestState, getErrorMessage(error));
4495 return;
4496 }
4497
4498 await setStepStatus(step, 'failed');
4499 await addLog(`步骤 ${step} 失败:${getErrorMessage(error)}`, 'error');
4500 await appendManualAccountRunRecordIfNeeded(`step${step}_failed`, latestState, getErrorMessage(error));
4501}
4502
4503async function executeStepViaCompletionSignal(step, timeoutMs = AUTO_RUN_SIGNAL_COMPLETION_TIMEOUT_MS) {
4504 const completionResultPromise = waitForStepComplete(step, timeoutMs).then(

Callers 1

Calls 6

getStateFunction · 0.85
isStopErrorFunction · 0.70
setStepStatusFunction · 0.70
addLogFunction · 0.70
getErrorMessageFunction · 0.70

Tested by

no test coverage detected