FlowiseAI/Flowise · error · Error

${e}

Error message

${e}

What it means

Redis vector store's `add` path catches any error from the Redis vectorstore ingestion pipeline (RedisVectorStore.fromDocuments / addDocuments, plus `redisClient.quit()`) and re-wraps it as `new Error(e)`. The underlying cause is typically Redis connectivity, missing RediSearch module, index schema mismatch, or a quit-time failure. The re-wrap discards the original stack.

Source

Thrown at packages/components/nodes/vectorstores/Redis/Redis.ts:201

                // Avoid Illegal invocation error
                vectorStore.similaritySearchVectorWithScore = async (query: number[], k: number, filter?: any) => {
                    return await similaritySearchVectorWithScore(
                        query,
                        k,
                        indexName,
                        metadataKey,
                        vectorKey,
                        contentKey,
                        redisClient,
                        filter
                    )
                }

                await redisClient.quit()

                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 indexName = nodeData.inputs?.indexName as string
        let contentKey = nodeData.inputs?.contentKey as string
        let metadataKey = nodeData.inputs?.metadataKey as string
        let vectorKey = nodeData.inputs?.vectorKey as string
        const embeddings = nodeData.inputs?.embeddings as Embeddings
        const topK = nodeData.inputs?.topK as string
        const k = topK ? parseFloat(topK) : 4
        const output = nodeData.outputs?.output as string

        let redisUrl = getCredentialParam('redisUrl', credentialData, nodeData)
        if (!redisUrl || redisUrl === '') {
            const username = getCredentialParam('redisCacheUser', credentialData, nodeData)

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Confirm the Redis instance is RediSearch-capable (Redis Stack) and reachable with the configured credentials.
  2. Verify the index name and key names (contentKey/metadataKey/vectorKey) match the existing index schema.
  3. Ensure the embedding dimension matches the index's vector field dimension.
  4. Run `redis-cli FT.INFO <index>` directly to validate the index and module.
  5. Differentiate the wrapped error by reproducing the underlying call in isolation.

Example fix

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

// after
catch (e) { throw new Error(`Redis add failed: ${e instanceof Error ? e.message : String(e)}`, { cause: e }) }
Defensive patterns

Strategy: try-catch

Validate before calling

async function assertRedisSearchReady(client: any, indexName: string) {
  try { await client.ft.info(indexName) } catch (e: any) {
    if (/unknown command/i.test(e?.message ?? '')) throw new Error('RediSearch module not loaded; use redis-stack')
  }
}

Type guard

null

Try / catch

try { await ingest() } catch (e) { throw new Error(`Redis ingest failed: ${e instanceof Error ? e.message : String(e)}`, { cause: e }) }

Prevention

When it happens

Trigger: Redis connection refused/timeout; RediSearch module not loaded (FT.CREATE / FT.INFO unavailable); index name/schema mismatch; `contentKey`/`metadataKey`/`vectorKey` misconfigured; `redisClient.quit()` throwing after a prior pipeline error; vector dimension mismatch with the index.

Common situations: Pointing at a plain Redis (no RediSearch); wrong Redis URL/password; embedding model changed so vector dim no longer matches the existing index; index dropped out-of-band.

Related errors


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