{"record":{"id":"d9216ad6a6dc9a0b","repo":"FlowiseAI/Flowise","slug":"aborted-d9216a","errorCode":null,"errorMessage":"Aborted!","messagePattern":"Aborted!","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"packages/components/nodes/sequentialagents/LLMNode/LLMNode.ts","lineNumber":580,"sourceCode":"        abortControllerSignal,\n        nodeData,\n        input,\n        options\n    }: {\n        state: ISeqAgentsState\n        llm: BaseChatModel\n        agent: AgentExecutor | RunnableSequence\n        name: string\n        abortControllerSignal: AbortController\n        nodeData: INodeData\n        input: string\n        options: ICommonObject\n    },\n    config: RunnableConfig\n) {\n    try {\n        if (abortControllerSignal.signal.aborted) {\n            throw new Error('Aborted!')\n        }\n\n        const historySelection = (nodeData.inputs?.conversationHistorySelection || 'all_messages') as ConversationHistorySelection\n        // @ts-ignore\n        state.messages = filterConversationHistory(historySelection, input, state)\n        // @ts-ignore\n        state.messages = restructureMessages(llm, state)\n\n        let result: AIMessageChunk | ICommonObject = await agent.invoke({ ...state, signal: abortControllerSignal.signal }, config)\n\n        const llmStructuredOutput = nodeData.inputs?.llmStructuredOutput\n        if (llmStructuredOutput && llmStructuredOutput !== '[]' && result.tool_calls && result.tool_calls.length) {\n            let jsonResult = {}\n            for (const toolCall of result.tool_calls) {\n                jsonResult = { ...jsonResult, ...toolCall.args }\n            }\n            result = { ...jsonResult, additional_kwargs: { nodeId: nodeData.id } }\n        }","sourceCodeStart":562,"sourceCodeEnd":598,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/sequentialagents/LLMNode/LLMNode.ts#L562-L598","documentation":"Raised at the start of agentNode when the AbortController's signal is already in the aborted state — i.e. the run was cancelled (user stop, client disconnect, upstream abort, or a timeout) before this node could invoke its agent. This is an intentional cancellation signal, not a defect in the flow.","triggerScenarios":"abortControllerSignal.signal.aborted === true at invocation time: the user clicked stop; the HTTP client disconnected; a parent caller aborted the chatflow; a configured timeout fired on an earlier node and the signal propagated.","commonSituations":"Long-running LLM calls cancelled by the user; streaming client drops the connection; chained nodes where an earlier node timed out; load-shedding aborts under pressure.","solutions":["Treat this as expected cancellation — surface an AbortError to the client rather than a generic failure, and do not auto-retry unless the user asks.","If aborts are premature, raise the client/server request timeout for the chatflow.","Propagate AbortController cleanly from the entry point so all nodes observe the same signal."],"exampleFix":"// before: abort surfaces as a generic Error\n} catch (error) { throw new Error(error) }\n\n// after: re-throw AbortError so callers can distinguish cancellation\nif (abortControllerSignal.signal.aborted) {\n  const e = new Error('Aborted!'); e.name = 'AbortError'; throw e\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"const isAbortError = (e: unknown): boolean =>\n  (e instanceof Error && e.name === 'AbortError') || /Aborted!/.test(String((e as Error)?.message ?? e))","tryCatchPattern":"try {\n  await agentNode(...)\n} catch (e) {\n  if (isAbortError(e)) { // graceful cancellation\n    return { messages: [] }\n  }\n  throw e\n}","preventionTips":["Distinguish AbortError from real failures in your error reporting so users see 'cancelled', not 'error'.","Size client/server timeouts to the slowest expected LLM call to avoid premature aborts.","Pass a single AbortController from the entry point so all nodes observe cancellation consistently."],"tags":["llm-node","abort","cancellation","runtime"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}