Budibase/budibase · error · HTTPError
Table not found
Error message
Table not found
What it means
Thrown by run in packages/server/src/sdk/workspace/rowActions/crud.ts when executing a row action against a tableId that does not resolve to an existing table. sdk.tables.getTable returns falsy and the run aborts before validating the view or row.
Source
Thrown at packages/server/src/sdk/workspace/rowActions/crud.ts:249
const { automationId } = actionsDoc.actions[rowActionId]
const automation = await automations.get(automationId)
await automations.remove(automation._id, automation._rev)
delete actionsDoc.actions[rowActionId]
return actionsDoc
})
}
export async function run(
tableId: any,
rowActionId: any,
rowId: string,
user: User,
sourceId?: string
) {
const table = await sdk.tables.getTable(tableId)
if (!table) {
throw new HTTPError("Table not found", 404)
}
if (sourceId && isViewId(sourceId)) {
const result = await sdk.rows.search({
tableId,
viewId: sourceId,
query: { equal: { _id: rowId } },
limit: 1,
})
if (!result.rows.length) {
throw new HTTPError("Row not found", 404)
}
}
const { automationId } = await get(tableId, rowActionId)
const automation = await sdk.automations.get(automationId)
const row = await sdk.rows.find(tableId, rowId)View on GitHub (pinned to a81a902e9a)
Solutions
- Fetch the table first (sdk.tables.getTable) or list tables to confirm the tableId exists in the target workspace.
- Correct the tableId — export the app or use the API to get the real id rather than hardcoding.
- If the table was deleted, recreate it or update the automation/script to point at the replacement table.
Example fix
// before await rowActions.run(badTableId, rowActionId, rowId, user) // after const table = await sdk.tables.getTable(tableId) if (table) await rowActions.run(tableId, rowActionId, rowId, user)
Defensive patterns
Strategy: validation
Validate before calling
const table = await sdk.tables.getTable(tableId)
if (!table) throw new Error(`Table ${tableId} does not exist in this workspace`) Try / catch
try {
await rowActions.run(tableId, rowActionId, rowId, user)
} catch (e) {
if (e instanceof HTTPError && e.status === 404 && e.message === "Table not found") {
// refresh table list / fix automation table reference
} else throw e
} Prevention
- Look up table ids dynamically instead of hardcoding them in automations or scripts.
- Clean up automations and scripts when their target tables are deleted.
- Confirm ids come from the same environment (dev vs prod) you are running against.
When it happens
Trigger: Calling run(tableId, rowActionId, rowId, user, sourceId?) with a tableId for a table that was deleted, never existed, or is in another workspace/app.
Common situations: Automations that reference a table deleted during app development; external scripts with hardcoded table ids from a copied app; environment mismatch where the id comes from production but the script runs against local dev.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Row not found
- Operation not found for this agent
- Custom REST template not found
- Automation not found
- Webhook not found
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/702701b65934c0b5.
Report an issue: GitHub.