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

  1. Run the referenced tool as a standalone node to see its real error.
  2. Verify the tool's credential is configured and valid.
  3. Check tool input args (toolInput) are present and correctly typed.
  4. Confirm the tool module still exists at the filePath after any upgrade.
  5. 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

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


AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12). Data as JSON: /api/errors/966336ad2dfa6a30. Report an issue: GitHub.