Budibase/budibase · error
Notification doc ${notificationDocId} not found
Error message
Notification doc ${notificationDocId} not found What it means
Thrown by the escalation respond flow when the referenced notification document does not exist in the workspace DB. The escalation itself is pending, but the notification that carried the response request cannot be found, so the response is rejected rather than applied to an unverifiable notification.
Source
Thrown at packages/server/src/sdk/workspace/escalations.ts:171
export async function respond(
escalationId: string,
notificationDocId: string,
response: EscalationResponse,
resolve: (escalationId: string, response: EscalationResponse) => Promise<void>
): Promise<EscalationRespondResult> {
const db = context.getWorkspaceDB()
const contextDoc = await getContextDoc(escalationId)
if (!contextDoc) {
throw new Error(`Escalation ${escalationId} not found`)
}
if (contextDoc.resolution !== "pending") {
return { status: "closed" }
}
const notifDoc = await db.tryGet<EscalationNotificationDoc>(notificationDocId)
if (!notifDoc) {
throw new Error(`Notification doc ${notificationDocId} not found`)
}
// Ensure the notification actually belongs to this escalation - stops a forged
// payload pairing a valid notificationDocId with a different escalationId.
if (notifDoc.escalationId !== escalationId) {
console.warn(
"Escalation respond: notification does not belong to escalation (possible forged payload)",
{
escalationId,
notificationDocId,
notifEscalationId: notifDoc.escalationId,
}
)
throw new Error(
`Notification ${notificationDocId} does not belong to escalation ${escalationId}`
)
}
await db.put({
...notifDoc,View on GitHub (pinned to a81a902e9a)
Solutions
- Confirm the notificationDocId matches the doc generated when the escalation notification was created
- Run the respond call within the workspace context that owns the notification
- If the notification was intentionally removed, treat the escalation via its context doc or re-issue a new notification
Example fix
// before await respond(escalationId, response, resolve) // notificationDocId captured from an expired payload // after const notif = await db.tryGet<EscalationNotificationDoc>(notificationDocId) if (notif) await respond(escalationId, response, resolve)
Defensive patterns
Strategy: validation
Validate before calling
const notif = await db.tryGet<EscalationNotificationDoc>(notificationDocId)
if (!notif) throw new Error(`Notification ${notificationDocId} not found — cannot respond`) Try / catch
try {
await respond(escalationId, response, resolve)
} catch (err) {
if (/Notification .* not found/.test(err.message)) {
return { status: "notification-missing" }
}
throw err
} Prevention
- Persist the escalationId/notificationDocId pair together from the original notification
- Never reconstruct notification IDs from partial data
- Verify tenant/workspace context so lookups hit the correct DB
When it happens
Trigger: Calling respond with a notificationDocId that is absent from the DB: the notification was deleted, the ID is mistyped, or the call is made against a different workspace DB than the one containing the notification.
Common situations: Replaying an old notification webhook after cleanup jobs removed the doc; environment mismatches where notifications live in a tenant-specific DB; copy-paste errors between notification and escalation IDs.
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
- Escalation ${escalationId} not found
- Workspace app not found ${workspaceAppId}
- Agent not found
- Operation not found
- Group not found
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/4d643c5c7e358171.
Report an issue: GitHub.