{"record":{"id":"abe2ffa59a4fc5ea","repo":"FlowiseAI/Flowise","slug":"e-abe2ff","errorCode":null,"errorMessage":"${e}","messagePattern":"\\$\\{e\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/vectorstores/Qdrant/Qdrant.ts","lineNumber":333,"sourceCode":"                            vectorStoreName: collectionName\n                        }\n                    })\n\n                    return res\n                } else {\n                    if (_batchSize) {\n                        const batchSize = parseInt(_batchSize, 10)\n                        for (let i = 0; i < finalDocs.length; i += batchSize) {\n                            const batch = finalDocs.slice(i, i + batchSize)\n                            await QdrantVectorStore.fromDocuments(batch, embeddings, dbConfig)\n                        }\n                    } else {\n                        await QdrantVectorStore.fromDocuments(finalDocs, embeddings, dbConfig)\n                    }\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 qdrantServerUrl = nodeData.inputs?.qdrantServerUrl as string\n            const collectionName = nodeData.inputs?.qdrantCollection as string\n            const embeddings = nodeData.inputs?.embeddings as Embeddings\n            const qdrantSimilarity = nodeData.inputs?.qdrantSimilarity\n            const qdrantVectorDimension = nodeData.inputs?.qdrantVectorDimension\n            const recordManager = nodeData.inputs?.recordManager\n\n            const credentialData = await getCredentialData(nodeData.credential ?? '', options)\n            const qdrantApiKey = getCredentialParam('qdrantApiKey', credentialData, nodeData)\n\n            const port = Qdrant_VectorStores.determinePortByUrl(qdrantServerUrl)\n\n            const client = new QdrantClient({\n                url: qdrantServerUrl,\n                apiKey: qdrantApiKey,","sourceCodeStart":315,"sourceCodeEnd":351,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/vectorstores/Qdrant/Qdrant.ts#L315-L351","documentation":"In Qdrant's `add` path, `QdrantVectorStore.fromDocuments` is awaited inside a try/catch that re-wraps the caught value as `new Error(e)`. This stringifies whatever was thrown (an Error becomes its .message, a string stays a string, an object becomes '[object Object]'), discarding the original stack trace and `cause`. The real failure originates inside the LangChain Qdrant integration or the Qdrant server.","triggerScenarios":"Qdrant server URL wrong/unreachable; invalid or missing `qdrantApiKey`; collection vector dimension does not match the embedding model output; `qdrantCollection` does not exist and cannot be auto-created; `batchSize` not parseable as int; TLS/DNS failure during `fromDocuments`.","commonSituations":"Embedding model swapped (e.g. 1536 -> 768 dims) without recreating the Qdrant collection; local Qdrant not running; cloud Qdrant URL typo; API key expired; network egress blocked from the worker.","solutions":["Verify `qdrantServerUrl` is reachable and the credential `qdrantApiKey` is valid for cloud clusters.","Confirm the collection's configured vector dimension equals the embedding model's output dimension.","Check that `qdrantCollection` exists (or that auto-create is enabled) and `qdrantSimilarity` matches the index.","Parse `batchSize` to an integer before the loop; ignore non-numeric values.","When debugging, log the original error (the wrapped message is lossy) to recover the underlying cause."],"exampleFix":"// before\ncatch (e) { throw new Error(e) }\n\n// after (preserve cause)\ncatch (e) { throw new Error(`Qdrant addDocuments failed: ${e instanceof Error ? e.message : String(e)}`, { cause: e }) }","handlingStrategy":"try-catch","validationCode":"function validateQdrantAddInputs(inputs: any) {\n  if (!inputs?.qdrantServerUrl) throw new Error('qdrantServerUrl is required')\n  if (!inputs?.embeddings) throw new Error('embeddings is required')\n  const dim = Number(inputs?.qdrantVectorDimension)\n  if (!Number.isFinite(dim) || dim <= 0) throw new Error('qdrantVectorDimension must be a positive number')\n  if (inputs?._batchSize != null && !/^\\d+$/.test(String(inputs._batchSize))) throw new Error('batchSize must be an integer string')\n}","typeGuard":"null","tryCatchPattern":"try { await QdrantVectorStore.fromDocuments(batch, embeddings, dbConfig) }\ncatch (e) { throw new Error(`Qdrant ingest failed: ${e instanceof Error ? e.message : String(e)}`, { cause: e }) }","preventionTips":["Verify server URL reachability and API key before bulk ingest.","Keep collection vector dimension in sync with the embedding model.","Use numeric batchSize only; fall back to single batch on parse failure.","Preserve the original error via `cause` instead of `new Error(e)`."],"tags":["qdrant","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"}