{"record":{"id":"689ee3b7a35c6fb6","repo":"FlowiseAI/Flowise","slug":"aborted","errorCode":null,"errorMessage":"Aborted!","messagePattern":"Aborted!","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"packages/components/nodes/multiagents/Supervisor/Supervisor.ts","lineNumber":682,"sourceCode":"            checkpointMemory: nodeData.inputs?.agentMemory\n        }\n\n        return returnOutput\n    }\n}\n\nasync function agentNode(\n    {\n        state,\n        agent,\n        nodeId,\n        abortControllerSignal\n    }: { state: ITeamState; agent: AgentExecutor | Runnable; nodeId: string; abortControllerSignal: AbortController },\n    config: RunnableConfig\n) {\n    try {\n        if (abortControllerSignal.signal.aborted) {\n            throw new Error('Aborted!')\n        }\n        const result = await agent.invoke({ ...state, signal: abortControllerSignal.signal }, config)\n        const additional_kwargs: ICommonObject = { nodeId, type: 'supervisor' }\n        result.additional_kwargs = { ...result.additional_kwargs, ...additional_kwargs }\n        return result\n    } catch (error) {\n        throw new Error('Aborted!')\n    }\n}\n\nconst processImageMessage = async (\n    index: number,\n    llm: BaseChatModel,\n    prompt: ChatPromptTemplate,\n    nodeData: INodeData,\n    options: ICommonObject\n) => {\n    let multiModalMessageContent: MessageContentImageUrl[] = []","sourceCodeStart":664,"sourceCodeEnd":700,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/multiagents/Supervisor/Supervisor.ts#L664-L700","documentation":"Thrown by agentNode at the start of execution when `abortControllerSignal.signal.aborted` is already true. This indicates the user (or a parent flow) cancelled the run before the agent's invoke began. The signal is passed in from options.signal.","triggerScenarios":"Calling agentNode after the abort controller was already triggered — e.g. a stop button pressed during graph setup, or a parent supervisor loop that aborted while scheduling this worker node.","commonSituations":"User cancels a long-running multi-agent chat; chatflow-level timeout fires; upstream node aborted and the graph still attempted to invoke downstream agent nodes.","solutions":["Treat as expected control flow — ensure the caller surfaces 'cancelled by user' rather than as a crash.","If unexpected, inspect where options.signal is being aborted prematurely (middleware, socket disconnect handler).","Add a graceful no-op return when aborted instead of throwing, if your graph supports partial results."],"exampleFix":"// before\nif (abortControllerSignal.signal.aborted) {\n  throw new Error('Aborted!')\n}\n// after\nif (abortControllerSignal.signal.aborted) {\n  return { messages: [], cancelled: true }\n}","handlingStrategy":"try-catch","validationCode":"if (abortControllerSignal.signal.aborted) {\n  return { messages: [], cancelled: true }\n}","typeGuard":null,"tryCatchPattern":"try {\n  // ... agent.invoke\n} catch (e) {\n  if (abortControllerSignal.signal.aborted || (e as Error)?.name === 'AbortError') {\n    // expected cancellation\n    return { messages: [], cancelled: true }\n  }\n  throw e\n}","preventionTips":["Differentiate user-initiated aborts from system errors in your error reporter.","Check signal.aborted early and short-circuit cleanly.","Avoid calling agentNode when the parent graph already cancelled."],"tags":["abort","control-flow","multiagent"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}