{"record":{"id":"8c666e82f3def40b","repo":"Mintplex-Labs/anything-llm","slug":"failed-to-create-new-qdrant-collection","errorCode":null,"errorMessage":"Failed to create new QDrant collection!","messagePattern":"Failed to create new QDrant collection!","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/utils/vectorDbProviders/qdrant/index.js","lineNumber":185,"sourceCode":"      this.logger(\"Adding new vectorized document into namespace\", namespace);\n      if (!skipCache) {\n        const cacheResult = await cachedVectorInformation(fullFilePath);\n        if (cacheResult.exists) {\n          const { client } = await this.connect();\n          const { chunks } = cacheResult;\n          const documentVectors = [];\n          vectorDimension =\n            chunks[0][0]?.vector?.length ??\n            chunks[0][0]?.values?.length ??\n            null;\n\n          const collection = await this.getOrCreateCollection(\n            client,\n            namespace,\n            vectorDimension\n          );\n          if (!collection)\n            throw new Error(\"Failed to create new QDrant collection!\", {\n              namespace,\n            });\n\n          for (const chunk of chunks) {\n            const submission = {\n              ids: [],\n              vectors: [],\n              payloads: [],\n            };\n\n            // Before sending to Qdrant and saving the records to our db\n            // we need to assign the id of each chunk that is stored in the cached file.\n            // The id property must be defined or else it will be unable to be managed by ALLM.\n            chunk.forEach((chunk) => {\n              const id = uuidv4();\n              if (chunk?.payload?.hasOwnProperty(\"id\")) {\n                const { id: _id, ...payload } = chunk.payload;\n                documentVectors.push({ docId, vectorId: id });","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/3aec848f2885144aa8f1e53b9731a04310d5d558/server/utils/vectorDbProviders/qdrant/index.js#L167-L203","documentation":"Creation guard in QDrant.addDocumentToNamespace: the attempt to create the new Qdrant collection for this namespace failed, so subsequent vector upserts cannot proceed and document embedding into Qdrant is aborted.","triggerScenarios":"Creation of a new QDrant collection failed.","commonSituations":"This error is raised at runtime in server/utils/vectorDbProviders/qdrant/index.js. It occurs when the required configuration for this provider is missing or invalid (unset environment variables, empty API key or base path), when the external service is unreachable or returns an unexpected response, or when invalid input reaches the call site. To prevent it, validate the relevant provider settings and environment variables at startup and confirm the service is reachable before this code path executes.","solutions":["Check QDrant logs and permissions, then retry.","Verify the vector dimension and collection configuration."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3aec848f2885144aa8f1e53b9731a04310d5d558","analyzedAt":"2026-08-18T10:02:21.017Z","contentChangedAt":"2026-08-18T10:02:21.017Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}