{"record":{"id":"9c1b2e4a3975c8b2","repo":"FlowiseAI/Flowise","slug":"e-9c1b2e","errorCode":null,"errorMessage":"${e}","messagePattern":"\\$\\{e\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/vectorstores/Pinecone/Pinecone.ts","lineNumber":185,"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: pineconeNamespace\n                        }\n                    })\n\n                    return res\n                } else {\n                    await PineconeStore.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 _index = nodeData.inputs?.pineconeIndex as string\n            const pineconeNamespace = nodeData.inputs?.pineconeNamespace as string\n            const embeddings = nodeData.inputs?.embeddings as Embeddings\n            const pineconeTextKey = nodeData.inputs?.pineconeTextKey as string\n            const recordManager = nodeData.inputs?.recordManager\n\n            const credentialData = await getCredentialData(nodeData.credential ?? '', options)\n            const pineconeApiKey = getCredentialParam('pineconeApiKey', credentialData, nodeData)\n\n            const client = new Pinecone({ apiKey: pineconeApiKey })\n\n            const pineconeIndex = client.Index(_index)\n\n            const obj: PineconeStoreParams = {\n                pineconeIndex,","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/vectorstores/Pinecone/Pinecone.ts#L167-L203","documentation":"Generic catch-all in the Pinecone node's add path wrapping either the record-manager-based upsert or `PineconeStore.fromDocuments`. Any exception is re-thrown as `new Error(e)`, flattening the original Pinecone/LangChain error into a string and dropping its stack.","triggerScenarios":"Pinecone API key invalid or environment/index misconfigured; namespace does not exist; vector dimension mismatch with the index; rate limiting (429) from Pinecone; record-manager key operations failing; embedding model error.","commonSituations":"Rotated API key; switched from pod to serverless (or vice versa) without updating config; embedding dimension changed; exceeded Pinecone pod quota; network egress blocked.","solutions":["Inspect the flattened message for the Pinecone SDK reason (auth, dimension, quota).","Verify `pineconeApiKey`, index name, environment/region, and namespace.","Confirm embedding dimension equals the Pinecone index dimension.","For 429s, add backoff/retry or reduce batch size.","Re-wrap preserving the original error (see fix)."],"exampleFix":"// before\n} catch (e) {\n    throw new Error(e)\n}\n// after — keep cause + stack\n} catch (e) {\n    throw e instanceof Error ? e : new Error(String(e))\n}","handlingStrategy":"try-catch","validationCode":"// preflight: validate Pinecone config + dimension\nif (!pineconeApiKey) throw new Error('pineconeApiKey is required')\nconst dim = (await embeddings.embedQuery('test')).length\nif (expectedIndexDimension && dim !== expectedIndexDimension) {\n  throw new Error(`Embedding dim ${dim} != index dim ${expectedIndexDimension}`)\n}","typeGuard":"function isPineconeRateLimit(e: unknown): boolean {\n  return typeof e === 'object' && e !== null && (e as any).status === 429\n}","tryCatchPattern":"try {\n  await PineconeStore.fromDocuments(finalDocs, embeddings, obj)\n} catch (e) {\n  if (isPineconeRateLimit(e)) { /* backoff + retry */ }\n  throw e instanceof Error ? e : new Error(String(e))\n}","preventionTips":["Keep embedding dimension aligned with the Pinecone index dimension.","Rotate API keys via secrets management.","Add backoff/retry around 429 responses.","Re-wrap errors preserving the original stack."],"tags":["pinecone","error-handling","upsert","stack-trace"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}