{"record":{"id":"1ac91a780c02faa7","repo":"Mintplex-Labs/anything-llm","slug":"azure-openai-failed-to-embed-error","errorCode":null,"errorMessage":"Azure OpenAI Failed to embed: ${error}","messagePattern":"Azure OpenAI Failed to embed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/utils/EmbeddingEngines/azureOpenAi/index.js","lineNumber":105,"sourceCode":"        .flat();\n      if (errors.length > 0) {\n        let uniqueErrors = new Set();\n        errors.map((error) =>\n          uniqueErrors.add(`[${error.type}]: ${error.message}`)\n        );\n\n        return {\n          data: [],\n          error: Array.from(uniqueErrors).join(\", \"),\n        };\n      }\n      return {\n        data: results.map((res) => res?.data || []).flat(),\n        error: null,\n      };\n    });\n\n    if (!!error) throw new Error(`Azure OpenAI Failed to embed: ${error}`);\n    return data.length > 0 &&\n      data.every((embd) => embd.hasOwnProperty(\"embedding\"))\n      ? data.map((embd) => embd.embedding)\n      : null;\n  }\n}\n\nmodule.exports = {\n  AzureOpenAiEmbedder,\n};\n","sourceCodeStart":87,"sourceCodeEnd":116,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/3aec848f2885144aa8f1e53b9731a04310d5d558/server/utils/EmbeddingEngines/azureOpenAi/index.js#L87-L116","documentation":"Aggregation guard in AzureOpenAiEmbedder.embedChunks: one or more chunk embedding sub-requests returned per-chunk errors (collected, deduplicated, and joined), so the batch is treated as failed and the combined error detail is rethrown to the caller.","triggerScenarios":"Thrown when an embedding request to Azure OpenAI fails.","commonSituations":"Bad credentials, wrong deployment name, or API error.","solutions":["Check the Azure endpoint, key, and deployment name.","Verify the deployment exists and the API version is supported.","Review the embedded error for details."],"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-23T08:17:48.524Z"}