FlowiseAI/Flowise · error · Error
${error}
Error message
${error} What it means
The outer catch-all of OpenAIAssistant agent's run. Any exception not handled by the inner tool/thread handlers is reported via onChainError then re-thrown as `new Error(error)` — stringifying the original (often an OpenAI SDK error) and losing its type, status, and stack. This is the same anti-pattern as errors 20/25/28.
Source
Thrown at packages/components/nodes/agents/OpenAIAssistant/OpenAIAssistant.ts:940
}
}
let llmOutput = returnVal.replace(imageRegex, '')
llmOutput = llmOutput.replace('<br/>', '')
await analyticHandlers.onLLMEnd(llmIds, llmOutput)
await analyticHandlers.onChainEnd(parentIds, messageData, true)
return {
text: returnVal,
usedTools,
artifacts,
fileAnnotations,
assistant: { assistantId: openAIAssistantId, threadId, runId: runThreadId, messages: messageData }
}
} catch (error) {
await analyticHandlers.onChainError(parentIds, error, true)
throw new Error(error)
}
}
}
const downloadImg = async (
openai: OpenAI,
fileId: string,
fileName: string,
orgId: string,
...paths: string[]
): Promise<{ filePath: string; totalSize: number }> => {
const response = await openai.files.content(fileId)
// Extract the binary data from the Response object
const image_data = await response.arrayBuffer()
// Convert the binary data to a Buffer
const image_data_buffer = Buffer.from(image_data)View on GitHub (pinned to abe4a8601a)
Solutions
- Check server logs and analytics (onChainError fires with the original error reference).
- Identify the OpenAI status: 401 → key; 429 → rate limit/quota; 5xx → provider; 404 → wrong assistant/thread id.
- Fix the specific upstream/credential/config issue.
- Patch to `throw new Error(error instanceof Error ? error.message : String(error), { cause: error })`.
Example fix
// before
} catch (error) {
await analyticHandlers.onChainError(parentIds, error, true)
throw new Error(error)
}
// after
} catch (error) {
const message = error instanceof Error ? error.message : String(error)
await analyticHandlers.onChainError(parentIds, error, true)
throw new Error(message, { cause: error })
} Defensive patterns
Strategy: try-catch
Try / catch
try {
await assistantNode.run(nodeData, input, options)
} catch (e) {
// original error stringified; use onChainError analytics + logs for the cause
const msg = (e as Error).message
if (/401|Unauthorized/.test(msg)) fixKey()
else if (/429|rate/i.test(msg)) backoff()
throw e
} Prevention
- Subscribe to onChainError analytics to capture the original error object.
- Keep server logging verbose in non-prod to see the un-stringified cause.
- Validate assistant, credential, and thread ids before runtime.
- Patch the catch to preserve `cause` so callers can branch.
When it happens
Trigger: Any uncaught failure during assistant execution: assistant retrieval, message listing, streaming setup, file annotation handling, downloadImg, or an error that escapes the inner try blocks.
Common situations: OpenAI SDK throws a 401/429/5xx not caught inner; message-list pagination fails; a file annotation references a missing file; streaming setup error.
Related errors
- Error in Agent node: ${error instanceof Error ? error.messag
- Error executing tool. Tool: ${tool.name}. Thread ID: ${threa
- Error in Condition Agent node: ${error instanceof Error ? er
- ${error}
- ${e}
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/0bd46c6887920ea9.
Report an issue: GitHub.