{"record":{"id":"a34a6ee2c5a2df85","repo":"Budibase/budibase","slug":"error-validating-configuration-message","errorCode":null,"errorMessage":"Error validating configuration: ${message}","messagePattern":"Error validating configuration: (.+?)","errorType":"http","errorClass":"HTTPError","httpStatus":400,"severity":"error","filePath":"packages/server/src/sdk/workspace/ai/configs/litellm.ts","lineNumber":362,"sourceCode":"    if (text.includes(\"DB not connected\")) {\n      throw new HTTPError(\n        \"LiteLLM requires a database connection. Set DATABASE_URL on LiteLLM when store_model_in_db is enabled.\",\n        400\n      )\n    }\n    throw new HTTPError(text, 500)\n  }\n\n  const json = await res.json()\n  if (json?.status !== \"success\") {\n    const message = [\n      \"Error validating configuration\",\n      sanitizeLiteLLMErrorMessage(json.error?.message || json.result?.error),\n    ]\n      .filter(Boolean)\n      .join(\": \")\n\n    throw new HTTPError(message, 400)\n  }\n}\n\nexport async function validateConfig(model: {\n  provider: string\n  name: string\n  credentialFields: Record<string, string>\n  configType: AIConfigType\n}) {\n  if (model.configType !== AIConfigType.COMPLETIONS) {\n    throw new HTTPError(`Unsupported AI config type: ${model.configType}`, 400)\n  }\n  return validateCompletionsModel(model)\n}\n\nexport async function getKeySettings(): Promise<{\n  keyId: string\n  secretKey: string","sourceCodeStart":344,"sourceCodeEnd":380,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/server/src/sdk/workspace/ai/configs/litellm.ts#L344-L380","documentation":"Error \"Error validating configuration: ${message}\" thrown in Budibase/budibase.","triggerScenarios":"Thrown at packages/server/src/sdk/workspace/ai/configs/litellm.ts:362 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":"a81a902e9a8fe55b467d106765f6638f12e35c49","analyzedAt":"2026-08-29T01:03:10.972Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}