paperclipai/paperclip · error
Approval "${params.approvalId}" not found
Error message
Approval "${params.approvalId}" not found What it means
The approvals API get() lookup found no approval with the given approvalId. The plugin referenced an approval that does not exist (bad id or already purged).
Source
Thrown at server/src/services/plugin-host-services.ts:2662
await ensurePluginAvailableForCompany(companyId);
const rows = await approvalSvc.list(companyId, params.status ?? undefined);
// Match the web app's approval read surface: payloads are redacted so
// the chat bridge never receives secrets the web app itself hides.
return rows.map((approval) => redactApprovalPayload(approval)) as any;
},
async get(params) {
const companyId = ensureCompanyId(params.companyId);
await ensurePluginAvailableForCompany(companyId);
const approval = await approvalSvc.getById(params.approvalId);
if (!approval || approval.companyId !== companyId) return null;
return redactApprovalPayload(approval) as any;
},
async decide(params) {
const companyId = ensureCompanyId(params.companyId);
await ensurePluginAvailableForCompany(companyId);
const existing = await approvalSvc.getById(params.approvalId);
if (!existing || existing.companyId !== companyId) {
throw new Error(`Approval "${params.approvalId}" not found`);
}
// Deciding an approval is a board-user action (the web app's approval
// decision routes are board-only). Re-verify active membership at apply
// time; never trust the plugin-supplied identity.
if (!params.actorUserId) {
throw new Error("actorUserId is required to decide an approval on behalf of a board user");
}
await requireActiveHumanMember(companyId, params.actorUserId);
const { approval, applied } = params.action === "approve"
? await approvalSvc.approve(params.approvalId, params.actorUserId, params.decisionNote ?? null)
: await approvalSvc.reject(params.approvalId, params.actorUserId, params.decisionNote ?? null);
await logPluginActivity({
companyId,
action: params.action === "approve" ? "approval.approved" : "approval.rejected",
entityType: "approval",
entityId: approval.id,View on GitHub (pinned to a7e689b3c3)
Solutions
- Confirm the approvalId exists for this company; list pending approvals and use a current ID — the approval may have been resolved or deleted.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/src/services/plugin-host-services.ts:2653 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@a7e689b3c3 (2026-08-18).
Data as JSON: /api/errors/6fc7542c39743916.
Report an issue: GitHub.