{"record":{"id":"38a1fa1db3d7fe28","repo":"Budibase/budibase","slug":"id-cannot-be-empty","errorCode":null,"errorMessage":"id cannot be empty","messagePattern":"id cannot be empty","errorType":"http","errorClass":"HTTPError","httpStatus":400,"severity":"error","filePath":"packages/server/src/sdk/workspace/ai/configs/index.ts","lineNumber":279,"sourceCode":"\nexport async function update(\n  config: Pick<\n    CustomAIProviderConfig,\n    | \"_id\"\n    | \"_rev\"\n    | \"name\"\n    | \"provider\"\n    | \"credentialsFields\"\n    | \"model\"\n    | \"configType\"\n    | \"reasoningEffort\"\n    | \"webSearchConfig\"\n    | \"isDefault\"\n  >\n): Promise<CustomAIProviderConfig> {\n  const id = config._id\n  if (!id) {\n    throw new HTTPError(\"id cannot be empty\", 400)\n  }\n\n  const existing = await find(id)\n  if (!existing) {\n    throw new HTTPError(\"Config to edit not found\", 404)\n  }\n\n  if (config.credentialsFields) {\n    const mergedCredentials = {\n      ...(existing.credentialsFields || {}),\n      ...config.credentialsFields,\n    }\n\n    Object.entries(mergedCredentials).forEach(([key, value]) => {\n      if (value === PASSWORD_REPLACEMENT) {\n        mergedCredentials[key] = existing.credentialsFields?.[key] || \"\"\n      }\n    })","sourceCodeStart":261,"sourceCodeEnd":297,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/server/src/sdk/workspace/ai/configs/index.ts#L261-L297","documentation":"Error \"id cannot be empty\" thrown in Budibase/budibase.","triggerScenarios":"Thrown at packages/server/src/sdk/workspace/ai/configs/index.ts:279 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"}