FlowiseAI/Flowise · error · Error
${e}
Error message
${e} What it means
Generic catch-all in the Pinecone (LlamaIndex) node wrapping `VectorStoreIndex.fromDocuments`. Any failure during LlamaIndex index construction (embedding, Pinecone write, service context error) is re-thrown as `new Error(e)`, losing the original stack.
Source
Thrown at packages/components/nodes/vectorstores/Pinecone/Pinecone_LlamaIndex.ts:156
for (let i = 0; i < flattenDocs.length; i += 1) {
if (flattenDocs[i] && flattenDocs[i].pageContent) {
finalDocs.push(new LCDocument(flattenDocs[i]))
}
}
const llamadocs: Document[] = []
for (const doc of finalDocs) {
llamadocs.push(new Document({ text: doc.pageContent, metadata: doc.metadata }))
}
const serviceContext = serviceContextFromDefaults({ llm: model, embedModel: embeddings })
const storageContext = await storageContextFromDefaults({ vectorStore: pcvs })
try {
await VectorStoreIndex.fromDocuments(llamadocs, { serviceContext, storageContext })
return { numAdded: finalDocs.length, addedDocs: finalDocs }
} catch (e) {
throw new Error(e)
}
}
}
async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
const indexName = nodeData.inputs?.pineconeIndex as string
const pineconeNamespace = nodeData.inputs?.pineconeNamespace as string
const pineconeMetadataFilter = nodeData.inputs?.pineconeMetadataFilter
const embeddings = nodeData.inputs?.embeddings as BaseEmbedding
const model = nodeData.inputs?.model
const topK = nodeData.inputs?.topK as string
const k = topK ? parseFloat(topK) : 4
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
const pineconeApiKey = getCredentialParam('pineconeApiKey', credentialData, nodeData)
const obj: PineconeParams = {
indexName,View on GitHub (pinned to abe4a8601a)
Solutions
- Inspect the flattened message for the LlamaIndex/Pinecone underlying error.
- Confirm `model` and `embeddings` are LlamaIndex-compatible `BaseEmbedding`/LLM instances.
- Verify Pinecone API key, index, and that the index dimension matches `embedModel`.
- Re-wrap preserving the original error (see fix).
Example fix
// before
} catch (e) {
throw new Error(e)
}
// after — preserve cause
} catch (e) {
throw e instanceof Error ? e : new Error(String(e))
} Defensive patterns
Strategy: try-catch
Validate before calling
// preflight: ensure LlamaIndex-compatible embed model + matching dimension
if (!embeddings || typeof (embeddings as any).getTextEmbedding !== 'function') {
throw new Error('embeddings must be a LlamaIndex BaseEmbedding')
}
const dim = (await (embeddings as any).getTextEmbedding('test')).length
if (indexDimension && dim !== indexDimension) throw new Error(`dim ${dim} != index ${indexDimension}`) Type guard
function isLlamaIndexEmbedding(v: unknown): boolean {
return typeof v === 'object' && v !== null && typeof (v as any).getTextEmbedding === 'function'
} Try / catch
try {
await VectorStoreIndex.fromDocuments(llamadocs, { serviceContext, storageContext })
} catch (e) {
throw e instanceof Error ? e : new Error(`LlamaIndex Pinecone index build failed: ${String(e)}`)
} Prevention
- Use LlamaIndex BaseEmbedding (not LangChain Embeddings) with this node.
- Confirm Pinecone index dimension matches the embed model.
- Verify API key/region before index construction.
- Re-wrap errors preserving the original.
When it happens
Trigger: Pinecone client/auth failure; embedding model error; service context misconfiguration (missing llm/embedModel); dimension mismatch between embedModel and the Pinecone index; network failure to Pinecone.
Common situations: Mixing LlamaIndex and LangChain embedding types; Pinecone serverless region mismatch; API key expired; embedding model returns a dimension different from the index.
Related errors
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/d8e23dec05583ed2.
Report an issue: GitHub.