FlowiseAI/Flowise · error · Error
${e}
Error message
${e} What it means
Generic catch-all around CouchbaseSearchVectorStore.fromDocuments during the upsert path. Wraps connection errors, bucket/scope/collection mismatches, indexing errors, and embedding failures into a string Error.
Source
Thrown at packages/components/nodes/vectorstores/Couchbase/Couchbase.ts:176
const couchbaseConfig: CouchbaseSearchVectorStoreArgs = {
cluster: couchbaseClient,
bucketName: bucketName,
scopeName: scopeName,
collectionName: collectionName,
indexName: indexName,
textKey: textKey,
embeddingKey: embeddingKey
}
try {
if (!textKey || textKey === '') couchbaseConfig.textKey = 'text'
if (!embeddingKey || embeddingKey === '') couchbaseConfig.embeddingKey = 'embedding'
await CouchbaseSearchVectorStore.fromDocuments(finalDocs, embeddings, couchbaseConfig)
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 bucketName = nodeData.inputs?.bucketName as string
const scopeName = nodeData.inputs?.scopeName as string
const collectionName = nodeData.inputs?.collectionName as string
const indexName = nodeData.inputs?.indexName as string
let textKey = nodeData.inputs?.textKey as string
let embeddingKey = nodeData.inputs?.embeddingKey as string
const embeddings = nodeData.inputs?.embeddings as Embeddings
const couchbaseMetadataFilter = nodeData.inputs?.couchbaseMetadataFilter
let connectionString = getCredentialParam('connectionString', credentialData, nodeData)
let databaseUsername = getCredentialParam('username', credentialData, nodeData)
let databasePassword = getCredentialParam('password', credentialData, nodeData)View on GitHub (pinned to abe4a8601a)
Solutions
- Verify cluster connectivity and credentials with a raw couchbase SDK connection test.
- Confirm bucket, scope, and collection names exist and the service account has access.
- Ensure the vector index (indexName) is created and its mapping matches textKey/embeddingKey.
- Replace `throw new Error(e)` with `throw e` to preserve the SDK's structured error.
Example fix
// before
} catch (e) {
throw new Error(e)
}
// after
} catch (e) {
console.error('Couchbase fromDocuments failed', e)
throw e
} Defensive patterns
Strategy: try-catch
Validate before calling
// confirm connectivity + index before upsert
const cluster = await couchbase.connect(connStr, { username, password })
const bucket = cluster.bucket(bucketName)
await bucket.defaultCollections() // throws if bucket missing
// verify the collection + search index exist
await cluster.searchIndexes().getAllIndexNames() // ensure indexName present Type guard
function isCouchbaseConfig(v: unknown): boolean {
return typeof v === 'object' && v !== null
&& typeof (v as any).bucketName === 'string'
&& typeof (v as any).scopeName === 'string'
&& typeof (v as any).collectionName === 'string'
} Try / catch
try {
await CouchbaseSearchVectorStore.fromDocuments(finalDocs, embeddings, cfg)
} catch (e) {
throw new Error(`Couchbase upsert failed (bucket=${cfg.bucketName}, scope=${cfg.scopeName}, coll=${cfg.collectionName}): ${e instanceof Error ? e.message : e}`)
} Prevention
- Provision the vector search index before first upsert.
- Confirm textKey/embeddingKey match the index mapping.
- Health-check the cluster connection before bulk operations.
When it happens
Trigger: Called from the Couchbase node's create/upsert when finalDocs and embeddings are pushed into a configured bucket/scope/collection. Fails on auth errors, missing bucket/scope/collection, missing vector index, or embedding service errors.
Common situations: Wrong connection string or credentials, bucket/scoped collection names typo'd, the Couchbase vector search index (indexName) not provisioned, or textKey/embeddingKey not matching the index mapping.
Related errors
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/69a05e9699b89d65.
Report an issue: GitHub.