{"record":{"id":"5d40dff5e1becc89","repo":"FlowiseAI/Flowise","slug":"e-5d40df","errorCode":null,"errorMessage":"${e}","messagePattern":"\\$\\{e\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/vectorstores/Upstash/Upstash.ts","lineNumber":163,"sourceCode":"                    await recordManager.createSchema()\n                    const res = await index({\n                        docsSource: finalDocs,\n                        recordManager,\n                        vectorStore,\n                        options: {\n                            cleanup: recordManager?.cleanup,\n                            sourceIdKey: recordManager?.sourceIdKey ?? 'source',\n                            vectorStoreName: UPSTASH_VECTOR_REST_URL\n                        }\n                    })\n\n                    return res\n                } else {\n                    await UpstashVectorStore.fromDocuments(finalDocs, embeddings, obj)\n                    return { numAdded: finalDocs.length, addedDocs: finalDocs }\n                }\n            } catch (e) {\n                throw new Error(e)\n            }\n        },\n        async delete(nodeData: INodeData, ids: string[], options: ICommonObject): Promise<void> {\n            const embeddings = nodeData.inputs?.embeddings as Embeddings\n            const recordManager = nodeData.inputs?.recordManager\n\n            const credentialData = await getCredentialData(nodeData.credential ?? '', options)\n            const UPSTASH_VECTOR_REST_URL = getCredentialParam('UPSTASH_VECTOR_REST_URL', credentialData, nodeData)\n            const UPSTASH_VECTOR_REST_TOKEN = getCredentialParam('UPSTASH_VECTOR_REST_TOKEN', credentialData, nodeData)\n\n            const upstashIndex = new UpstashIndex({\n                url: UPSTASH_VECTOR_REST_URL,\n                token: UPSTASH_VECTOR_REST_TOKEN\n            })\n\n            const obj = {\n                index: upstashIndex\n            }","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/vectorstores/Upstash/Upstash.ts#L145-L181","documentation":"Upstash's `add` path wraps failures from `UpstashVectorStore.fromDocuments` (or the index upsert with recordManager cleanup) into `new Error(e)`. The underlying cause is typically invalid `UPSTASH_VECTOR_REST_URL`/`UPSTASH_VECTOR_REST_TOKEN`, vector dimension mismatch with the Upstash index, or network failure. The re-wrap discards the original stack.","triggerScenarios":"Wrong/missing Upstash REST URL or token; embedding dimension != Upstash index dimension; Upstash index deleted or not created; recordManager cleanup failure; network egress blocked.","commonSituations":"Credentials not set or rotated; embedding model changed dimension; Upstash free-tier rate limit; URL typo (missing https); token copied with whitespace.","solutions":["Confirm `UPSTASH_VECTOR_REST_URL` and `UPSTASH_VECTOR_REST_TOKEN` resolve and are valid.","Match the embedding model dimension to the Upstash index dimension.","Verify the Upstash index exists and is reachable.","If using recordManager cleanup, ensure its store is reachable."],"exampleFix":"// before\ncatch (e) { throw new Error(e) }\n\n// after\ncatch (e) { throw new Error(`Upstash add failed: ${e instanceof Error ? e.message : String(e)}`, { cause: e }) }","handlingStrategy":"try-catch","validationCode":"function validateUpstashAddInputs(creds: any, inputs: any) {\n  if (!creds?.UPSTASH_VECTOR_REST_URL) throw new Error('UPSTASH_VECTOR_REST_URL required')\n  if (!creds?.UPSTASH_VECTOR_REST_TOKEN) throw new Error('UPSTASH_VECTOR_REST_TOKEN required')\n  if (!inputs?.embeddings) throw new Error('embeddings required')\n}","typeGuard":"null","tryCatchPattern":"try { await UpstashVectorStore.fromDocuments(finalDocs, embeddings, obj) }\ncatch (e) { throw new Error(`Upstash ingest failed: ${e instanceof Error ? e.message : String(e)}`, { cause: e }) }","preventionTips":["Confirm REST URL/token are valid and trimmed.","Keep embedding dimension == Upstash index dimension.","Verify the Upstash index exists.","Preserve original error with `cause`."],"tags":["upstash","vectorstore","error-wrapping","network","typescript"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}