FlowiseAI/Flowise · error · Error
${e}
Error message
${e} What it means
SingleStore's `add` path constructs a `SingleStoreVectorStore` and calls `vectorStore.addDocuments.bind(vectorStore)(finalDocs)` inside a try/catch that re-wraps the result as `new Error(e)`. Note the bound call's returned Promise is not awaited, so asynchronous failures from `addDocuments` may escape this catch entirely; the catch mainly guards synchronous construction errors. Real failures usually come from SingleStore connectivity/SQL.
Source
Thrown at packages/components/nodes/vectorstores/Singlestore/Singlestore.ts:155
} as SingleStoreVectorStoreConfig
const docs = nodeData.inputs?.document as Document[]
const embeddings = nodeData.inputs?.embeddings as Embeddings
const flattenDocs = docs && docs.length ? flatten(docs) : []
const finalDocs = []
for (let i = 0; i < flattenDocs.length; i += 1) {
if (flattenDocs[i] && flattenDocs[i].pageContent) {
finalDocs.push(new Document(flattenDocs[i]))
}
}
try {
const vectorStore = new SingleStoreVectorStore(embeddings, singleStoreConnectionConfig)
vectorStore.addDocuments.bind(vectorStore)(finalDocs)
return { numAdded: finalDocs.length, addedDocs: finalDocs }
} catch (e) {
throw new Error(e)
}
}
}
async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
const user = getCredentialParam('user', credentialData, nodeData)
const password = getCredentialParam('password', credentialData, nodeData)
const singleStoreConnectionConfig = {
connectionOptions: {
host: nodeData.inputs?.host as string,
port: 3306,
user,
password,
database: nodeData.inputs?.database as string
},
...(nodeData.inputs?.tableName ? { tableName: nodeData.inputs.tableName as string } : {}),View on GitHub (pinned to abe4a8601a)
Solutions
- Verify `host`, credentials (`user`/`password`), and database name resolve and authenticate.
- Ensure the target table exists with a compatible vector/embedding column.
- Await the addDocuments call so async errors are actually caught: `await vectorStore.addDocuments(finalDocs)`.
- Test the connection in isolation with a simple SELECT before ingestion.
Example fix
// before
vectorStore.addDocuments.bind(vectorStore)(finalDocs) // not awaited
catch (e) { throw new Error(e) }
// after
await vectorStore.addDocuments(finalDocs)
catch (e) { throw new Error(`SingleStore addDocuments failed: ${e instanceof Error ? e.message : String(e)}`, { cause: e }) } Defensive patterns
Strategy: try-catch
Validate before calling
function validateSingleStoreInputs(inputs: any, creds: any) {
if (!inputs?.host) throw new Error('host is required')
if (!creds?.user || !creds?.password) throw new Error('singlestore user/password required')
} Type guard
null
Try / catch
try { await vectorStore.addDocuments(finalDocs) } // MUST await
catch (e) { throw new Error(`SingleStore ingest failed: ${e instanceof Error ? e.message : String(e)}`, { cause: e }) } Prevention
- Await addDocuments so async errors are caught.
- Validate connection options before constructing the store.
- Confirm the target table and vector column exist.
- Test connectivity with a simple SELECT first.
When it happens
Trigger: SingleStore host/port unreachable; wrong user/password (credential); database/table not present or wrong schema; vector column type mismatch; the un-awaited `addDocuments` promise rejecting asynchronously (not caught here).
Common situations: SingleStore connection options misconfigured (host, port, database); credentials rotated; table missing the embedding column; network/firewall blocking the SingleStore port.
Related errors
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/e57f4a4e3f607c34.
Report an issue: GitHub.