FlowiseAI/Flowise · error · Error

${e}

Error message

${e}

What it means

Wraps any failure from VectaraStore.fromDocuments(finalDocs, ...) or vectorStore.addFiles(vectaraFiles) inside Vectara node init. The handler does `new Error(e)` on an already-Error value, so the original SDK error is stringified into the message (e.g. "Error: <original>") and its stack/name/.cause are lost. The real cause is whatever the Vectara REST/LangChain layer threw.

Source

Thrown at packages/components/nodes/vectorstores/Vectara/Vectara.ts:229

                for (const file of files) {
                    if (!file) continue
                    const splitDataURI = file.split(',')
                    splitDataURI.pop()
                    const bf = Buffer.from(splitDataURI.pop() || '', 'base64')
                    const blob = new Blob([bf])
                    vectaraFiles.push({ blob: blob, fileName: getFileName(file) })
                }
            }

            try {
                if (finalDocs.length) await VectaraStore.fromDocuments(finalDocs, embeddings, vectaraArgs)
                if (vectaraFiles.length) {
                    const vectorStore = new VectaraStore(vectaraArgs)
                    await vectorStore.addFiles(vectaraFiles)
                }
                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 apiKey = getCredentialParam('apiKey', credentialData, nodeData)
        const customerId = getCredentialParam('customerID', credentialData, nodeData)
        const corpusId = getCredentialParam('corpusID', credentialData, nodeData).split(',')

        const vectaraMetadataFilter = nodeData.inputs?.filter as string
        const sentencesBefore = nodeData.inputs?.sentencesBefore as number
        const sentencesAfter = nodeData.inputs?.sentencesAfter as number
        const lambda = nodeData.inputs?.lambda as number
        const output = nodeData.outputs?.output as string
        const topK = nodeData.inputs?.topK as string
        const k = topK ? parseFloat(topK) : 5
        const mmrK = nodeData.inputs?.mmrK as number

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Read the literal text after "Error:" in the message — that is the flattened Vectara SDK error; address its underlying cause (auth, not-found, unsupported file, etc.).
  2. Verify vectaraArgs credentials (apiKey, customerID, corpusID) against the Vectara console and confirm the corpus is enabled.
  3. For addFiles failures, confirm the file type/size is supported by Vectara's file upload API.
  4. Patch the wrapper to rethrow e unchanged: `throw e instanceof Error ? e : new Error(String(e))` so stack and cause survive.

Example fix

// before
} catch (e) {
    throw new Error(e)
}

// after
} catch (e) {
    throw e instanceof Error ? e : new Error(String(e))
}
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-flight: verify Vectara credentials + corpus before init
function validateVectaraArgs(args) {
    if (!args.apiKey) throw new Error('Vectara apiKey missing')
    if (!args.customerId) throw new Error('Vectara customerID missing')
    if (!args.corpusId || corpusId.length === 0) throw new Error('Vectara corpusID missing')
    if (finalDocs.length === 0 && vectaraFiles.length === 0) throw new Error('Nothing to ingest')
}

Type guard

null

Try / catch

// Preserve the original SDK error; surface .cause for diagnostics
try {
    if (finalDocs.length) await VectaraStore.fromDocuments(finalDocs, embeddings, vectaraArgs)
    if (vectaraFiles.length) await new VectaraStore(vectaraArgs).addFiles(vectaraFiles)
} catch (e) {
    throw e instanceof Error ? e : new Error(String(e))
}

Prevention

When it happens

Trigger: Calling the Vectara node init with documents when VectaraStore.fromDocuments rejects (bad apiKey/customerID/corpusID in vectaraArgs, corpus not enabled, rate limited, network), or with files when vectorStore.addFiles rejects (unsupported file type, oversized blob, auth).

Common situations: Typo in Vectara credential (apiKey, customerID, wrong corpusID split), corpus not yet provisioned on the Vectara side, uploaded MIME/extension Vectara REST API rejects, expired API key, on-prem Vectara endpoint unreachable from the Flowise server.

Related errors


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