Budibase/budibase · error · Error
actionType ${query.extra.actionType} does not exist on DB fo
Error message
actionType ${query.extra.actionType} does not exist on DB for update What it means
MongoDB integration's update() switches on query.extra.actionType to pick updateOne or updateMany (with filter, update, options). If the actionType is not a supported update operation, the default branch throws 'actionType <X> does not exist on DB for update'.
Source
Thrown at packages/server/src/integrations/mongodb.ts:594
}
switch (query.extra.actionType) {
case "updateOne": {
return await collection.updateOne(
json.filter,
json.update,
json.options as UpdateOptions
)
}
case "updateMany": {
return await collection.updateMany(
json.filter,
json.update,
json.options as UpdateOptions
)
}
default: {
throw new Error(
`actionType ${query.extra.actionType} does not exist on DB for update`
)
}
}
} catch (err) {
console.error("Error writing to mongodb", err)
throw err
} finally {
await this.client.close()
}
}
async delete(query: MongoDBQuery): Promise<DeleteResult> {
try {
await this.connect()
const db = this.client.db(this.config.db)
const collection = db.collection(query.extra.collection)
let queryJson = query.jsonView on GitHub (pinned to a81a902e9a)
Solutions
- Set query.extra.actionType to exactly "updateOne" or "updateMany"
- Ensure the JSON payload includes filter and update fields compatible with the chosen action
- Re-create or re-save the query in the builder so the generated payload matches the operation
- Validate actionType against the supported list before execution
Example fix
// before
const query = { table: "users", json: { filter: { _id: 1 }, update: { $set: { name: "x" } } }, extra: { actionType: "update" } }
// after
const query = { table: "users", json: { filter: { _id: 1 }, update: { $set: { name: "x" } } }, extra: { actionType: "updateOne" } } Defensive patterns
Strategy: validation
Validate before calling
const UPDATE_ACTIONS = ["updateOne", "updateMany"]
if (!UPDATE_ACTIONS.includes(query.extra?.actionType)) {
throw new Error(`Invalid update actionType: ${query.extra?.actionType}`)
}
await ds.update(query) Type guard
function isUpdateAction(t: unknown): t is "updateOne" | "updateMany" {
return t === "updateOne" || t === "updateMany"
} Try / catch
try {
await ds.update(query)
} catch (err) {
if (err.message.includes("does not exist on DB for update")) {
throw new Error(`Unsupported MongoDB update action "${query.extra?.actionType}"; use updateOne or updateMany`, { cause: err })
}
throw err
} Prevention
- Use exactly updateOne/updateMany, not shell-style 'update' or 'replaceOne' unless supported
- Always include filter and update in the JSON payload
- Generate queries via the builder to avoid actionType drift
- Validate actionType when importing or hand-editing query definitions
When it happens
Trigger: Executing an update query whose actionType is misspelled, empty, or not an update-family action (e.g. 'update' instead of 'updateOne', or 'replaceOne' when unsupported by the mapping).
Common situations: Hand-built JSON payloads missing the exact action names; queries copied from MongoDB shell syntax into Budibase queries; schema drift after editing a query's operation type in the UI.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- actionType ${query.extra.actionType} does not exist on DB fo
- actionType ${query.extra.actionType} does not exist on DB fo
- actionType ${query.extra.actionType} does not exist on DB fo
- Project id is required.
- Project revision is required.
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/2e21f9ef3c1c61cc.
Report an issue: GitHub.