{"record":{"id":"34f2a7d7341d6d64","repo":"Budibase/budibase","slug":"text","errorCode":null,"errorMessage":"${text}","messagePattern":"\\$\\{text\\}","errorType":"http","errorClass":"HTTPError","httpStatus":500,"severity":"error","filePath":"packages/server/src/sdk/workspace/ai/configs/litellm.ts","lineNumber":350,"sourceCode":"        ...credentialFields,\n      },\n    }),\n  }\n\n  const res = await fetch(\n    `${liteLLMUrl}/health/test_connection`,\n    requestOptions\n  )\n\n  if (res.status !== 200) {\n    const text = await res.text()\n    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","sourceCodeStart":332,"sourceCodeEnd":368,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/server/src/sdk/workspace/ai/configs/litellm.ts#L332-L368","documentation":"Error \"${text}\" thrown in Budibase/budibase.","triggerScenarios":"Thrown at packages/server/src/sdk/workspace/ai/configs/litellm.ts:350 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"}