{"record":{"id":"40535e5d234ca500","repo":"FlowiseAI/Flowise","slug":"aborted-40535e","errorCode":null,"errorMessage":"Aborted!","messagePattern":"Aborted!","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"packages/components/nodes/multiagents/Worker/Worker.ts","lineNumber":281,"sourceCode":"            ])\n        }\n        return conversationChain\n    }\n}\n\nasync function agentNode(\n    {\n        state,\n        agent,\n        name,\n        nodeId,\n        abortControllerSignal\n    }: { state: ITeamState; agent: AgentExecutor | RunnableSequence; name: string; nodeId: string; abortControllerSignal: AbortController },\n    config: RunnableConfig\n) {\n    try {\n        if (abortControllerSignal.signal.aborted) {\n            throw new Error('Aborted!')\n        }\n\n        const result = await agent.invoke({ ...state, signal: abortControllerSignal.signal }, config)\n        const additional_kwargs: ICommonObject = { nodeId, type: 'worker' }\n        if (result.usedTools) {\n            additional_kwargs.usedTools = result.usedTools\n        }\n        if (result.sourceDocuments) {\n            additional_kwargs.sourceDocuments = result.sourceDocuments\n        }\n        return {\n            messages: [\n                new HumanMessage({\n                    content: typeof result === 'string' ? result : result.output,\n                    name,\n                    additional_kwargs: Object.keys(additional_kwargs).length ? additional_kwargs : undefined\n                })\n            ]","sourceCodeStart":263,"sourceCodeEnd":299,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/multiagents/Worker/Worker.ts#L263-L299","documentation":"Worker's agentNode checks `abortControllerSignal.signal.aborted` before invoking the agent. If the worker run was cancelled before invoke started (e.g. supervisor decided to stop, user clicked stop), it throws 'Aborted!' immediately.","triggerScenarios":"Cancellation signal already set when agentNode is entered — stop button, parent timeout, graph teardown.","commonSituations":"Long-running worker pipelines where the user cancels mid-flight; supervisor max-iterations reached with concurrent worker aborts.","solutions":["Treat as benign cancellation — log at info level and exit cleanly.","Investigate premature aborts by tracing where options.signal.abort() is called.","Return a partial/empty result instead of throwing if your graph tolerates it."],"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 { /* invoke */ }\ncatch (e) {\n  if (abortControllerSignal.signal.aborted || (e as Error)?.name === 'AbortError') return { messages: [], cancelled: true }\n  throw e\n}","preventionTips":["Short-circuit cleanly on abort.","Avoid masking non-abort errors as aborts."],"tags":["abort","control-flow","worker"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}