Budibase/budibase · error · HTTPError
Knowledge base type cannot be changed
Error message
Knowledge base type cannot be changed
What it means
Error "Knowledge base type cannot be changed" thrown in Budibase/budibase.
Source
Thrown at packages/server/src/sdk/workspace/ai/knowledgeBase/crud.ts:125
export async function update(
config: UpdateKnowledgeBaseRequest
): Promise<KnowledgeBase> {
if (!config._id || !config._rev) {
throw new HTTPError("id and rev required", 400)
}
const db = context.getWorkspaceDB()
const existing = await db.tryGet<KnowledgeBase>(config._id)
if (!existing) {
throw new HTTPError("Knowledge base not found", 404)
}
let updated: KnowledgeBase
const knowledgeBaseType = config.type
switch (knowledgeBaseType) {
case KnowledgeBaseType.GEMINI: {
if (knowledgeBaseType !== existing.type) {
throw new HTTPError("Knowledge base type cannot be changed", 400)
}
updated = {
...existing,
...config,
type: KnowledgeBaseType.GEMINI,
config: { googleFileStoreId: existing.config.googleFileStoreId },
} satisfies GeminiKnowledgeBase
break
}
default:
throw utils.unreachable(knowledgeBaseType)
}
if (
updated.type === KnowledgeBaseType.GEMINI &&
!updated.config.googleFileStoreId
) {
throw new HTTPError(View on GitHub (pinned to a81a902e9a)
When it happens
Trigger: Thrown at packages/server/src/sdk/workspace/ai/knowledgeBase/crud.ts:125 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/c660846c8cf43126.
Report an issue: GitHub.