{"record":{"id":"5588dcb56cd40136","repo":"chroma-core/chroma","slug":"config-validation-failed-for-schema-schemaname-5588dc","errorCode":null,"errorMessage":"Config validation failed for schema '${schemaName}': ${errorPaths}","messagePattern":"Config validation failed for schema '(.+?)': (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"clients/new-js/packages/ai-embeddings/common/src/schema-utils.ts","lineNumber":123,"sourceCode":" * @param config Configuration to validate\n * @param schemaName Name of the schema file (without .json extension)\n * @throws Error if the configuration does not match the schema\n */\nexport function validateConfigSchema(\n\tconfig: Record<string, any>,\n\tschemaName: keyof typeof schemaMap,\n): void {\n\tconst schema = loadSchema(schemaName);\n\n\tconst validate = ajv.compile(schema);\n\tconst valid = validate(config);\n\n\tif (!valid) {\n\t\tconst errors = validate.errors || [];\n\t\tconst errorPaths = errors\n\t\t\t.map((e) => `${e.instancePath || \"/\"}: ${e.message}`)\n\t\t\t.join(\", \");\n\t\tthrow new Error(\n\t\t\t`Config validation failed for schema '${schemaName}': ${errorPaths}`,\n\t\t);\n\t}\n}\n\n/**\n * Get the version of a schema.\n *\n * @param schemaName Name of the schema file (without .json extension)\n * @returns The schema version as a string\n * @throws Error if the schema file does not exist or is not valid JSON\n */\nexport function getSchemaVersion(schemaName: keyof typeof schemaMap): string {\n\tconst schema = loadSchema(schemaName);\n\treturn schema.version || \"1.0.0\";\n}\n\n/**","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/clients/new-js/packages/ai-embeddings/common/src/schema-utils.ts#L105-L141","documentation":"Error \"Config validation failed for schema '${schemaName}': ${errorPaths}\" thrown in chroma-core/chroma.","triggerScenarios":"Thrown at clients/new-js/packages/ai-embeddings/common/src/schema-utils.ts:123 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"aecdd12c8a891610db8653630b066b32ceb678b5","analyzedAt":"2026-08-16T21:53:27.228Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}