{"record":{"id":"8fe9b8ce0eab4d0b","repo":"FlowiseAI/Flowise","slug":"e-8fe9b8","errorCode":null,"errorMessage":"${e}","messagePattern":"\\$\\{e\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/vectorstores/Chroma/Chroma.ts","lineNumber":147,"sourceCode":"                    const vectorStore = await Chroma.fromExistingCollection(embeddings, obj)\n                    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: collectionName\n                        }\n                    })\n                    return res\n                } else {\n                    await Chroma.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 collectionName = nodeData.inputs?.collectionName as string\n            const embeddings = nodeData.inputs?.embeddings as Embeddings\n            const chromaURL = nodeData.inputs?.chromaURL as string\n            const recordManager = nodeData.inputs?.recordManager\n\n            const credentialData = await getCredentialData(nodeData.credential ?? '', options)\n            const chromaApiKey = getCredentialParam('chromaApiKey', credentialData, nodeData)\n            const chromaTenant = getCredentialParam('chromaTenant', credentialData, nodeData)\n            const chromaDatabase = getCredentialParam('chromaDatabase', credentialData, nodeData)\n\n            const obj = _buildChromaConfig(collectionName, chromaURL, chromaApiKey, chromaTenant, chromaDatabase)\n\n            try {\n                if (recordManager) {\n                    const vectorStoreName = collectionName","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/vectorstores/Chroma/Chroma.ts#L129-L165","documentation":"Thrown in Chroma vectorStoreMethods as the catch-all around Chroma.fromDocuments and record-manager indexing. Covers connection, auth, collection, and document-insertion failures. Uses `throw new Error(e)`, coercing the underlying error to a string and losing its stack/type.","triggerScenarios":"Chroma server unreachable (wrong chromaURL); chromaApiKey mismatch when auth is enabled; collection does not exist or dimension mismatch; embeddings dimension differs from the collection's; recordManager misconfigured; network failure.","commonSituations":"Self-hosted Chroma not running; chromaURL points to wrong host/port; Chroma auth enabled but key wrong or tenant/database mismatch; collection created with a different embedding dimension; Chroma version incompatibility.","solutions":["Confirm Chroma is reachable: `curl <chromaURL>/api/v1/heartbeat`.","Verify chromaApiKey, chromaTenant, chromaDatabase match the Chroma server's auth config.","Ensure the collection exists and its embedding dimension matches the embeddings model.","For record-manager mode, confirm the record manager datastore is configured and reachable.","Retry on transient network failures."],"exampleFix":"// before\nchromaURL = 'http://localhost:8000' // wrong port -> connection refused, wrapped here\n\n// after\nchromaURL = 'http://localhost:8000' // confirm reachable: curl http://localhost:8000/api/v1/heartbeat","handlingStrategy":"try-catch","validationCode":"async function preflightChroma(url: string, creds: any) {\n  if (!/^https?:\\/\\//.test(url)) throw new Error('chromaURL must be a full http(s) URL')\n  const res = await fetch(`${url.replace(/\\/$/, '')}/api/v1/heartbeat`).catch(() => null)\n  if (!res || !res.ok) throw new Error(`Chroma unreachable at ${url} — start the server or fix the URL`)\n  if (creds?.chromaApiKey === undefined && process.env.CHROMA_API_KEY) {\n    throw new Error('Chroma server has auth enabled but chromaApiKey credential is not set')\n  }\n}","typeGuard":"const hasChromaEndpoint = (v: unknown): v is string =>\n  typeof v === 'string' && /^https?:\\/\\/.+/.test(v)","tryCatchPattern":"try { return await chromaNode.vectorStoreMethods.upsert(nodeData, options) }\ncatch (e) {\n  const msg = (e as Error).message\n  if (/econnrefused|enotfound|fetch failed/i.test(msg)) throw new Error('Chroma server unreachable — check chromaURL')\n  if (/unauthor|401|api key/i.test(msg)) throw new Error('Chroma auth failed — check chromaApiKey/tenant/database')\n  if (/dimension|embedding/i.test(msg)) throw new Error('Collection embedding dimension mismatch')\n  throw e\n}","preventionTips":["Health-check Chroma (`/api/v1/heartbeat`) before running flows.","Keep chromaApiKey, chromaTenant, chromaDatabase aligned with the Chroma server's auth config.","Ensure the collection's embedding dimension matches the embeddings model.","For record-manager mode, confirm the record manager datastore is reachable.","Pin a compatible Chroma server version; upgrade with a migration test."],"tags":["vector-store","chroma","network","credentials","error-wrapping"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}