FlowiseAI/Flowise · error · Error
${e}
Error message
${e} What it means
Tool_Agentflow.run()'s catch block re-throws any exception from tool execution as `new Error(e)`, stringifying the original error and losing its stack/type. The returnOutput built before the failure is discarded.
Source
Thrown at packages/components/nodes/agentflow/Tool/Tool.ts:348
newState = processTemplateVariables(newState, toolOutput)
const returnOutput = {
id: nodeData.id,
name: this.name,
input: {
toolInputArgs: toolInput ?? toolInputArgs,
selectedTool: selectedTool
},
output: {
content: toolOutput,
artifacts: parsedArtifacts
},
state: newState
}
return returnOutput
} catch (e) {
throw new Error(e)
}
}
}
module.exports = { nodeClass: Tool_Agentflow }
View on GitHub (pinned to abe4a8601a)
Solutions
- Run the referenced tool as a standalone node to see its real error.
- Verify the tool's credential is configured and valid.
- Check tool input args (toolInput) are present and correctly typed.
- Confirm the tool module still exists at the filePath after any upgrade.
- Patch to `throw new Error(e instanceof Error ? e.message : String(e), { cause: e })` to preserve causality.
Example fix
// before
} catch (e) {
throw new Error(e)
}
// after
} catch (e) {
throw new Error(e instanceof Error ? e.message : String(e), { cause: e })
} Defensive patterns
Strategy: try-catch
Validate before calling
const tool = nodeData.inputs?.selectedTool
const mod = options.componentNodes?.[tool]
if (!mod?.filePath) throw new Error(`Tool ${tool} is missing a filePath; cannot import`) Try / catch
try {
await toolNode.run(nodeData, input, options)
} catch (e) {
// original tool error stringified; reproduce by calling the tool directly
throw e
} Prevention
- Configure each tool's credential before referencing it.
- Test the referenced tool standalone first.
- Keep tool component filePaths stable across upgrades.
- Validate toolInput args are present before the Tool node runs.
When it happens
Trigger: The dynamically-imported tool's run() throws: the tool's own credential is missing, the tool's API call fails, the tool module fails to import (bad filePath), or tool input args are malformed.
Common situations: Selected tool lacks a credential (e.g. SerpAPI without API key); tool's external API is down/rate-limited; tool component path changed after upgrade; tool expects args that the flow did not supply.
Related errors
- ${error}
- ${e}
- ${errorMessage}
- Error in LLM node: ${error instanceof Error ? error.message
- Tool not selected
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/966336ad2dfa6a30.
Report an issue: GitHub.