paperclipai/paperclip · error · Error
${entityName} not found
Error message
${entityName} not found What it means
requireInCompany received a null/undefined record (or one whose companyId does not match) for the named entity. It is the generic company-boundary lookup guard: the requested entity does not exist or is not accessible within the calling company.
Source
Thrown at server/src/services/plugin-host-services.ts:865
companyId: workspace.companyId,
projectId: workspace.projectId,
projectWorkspaceId: workspace.projectWorkspaceId,
path: workspace.cwd ?? workspace.providerRef,
cwd: workspace.cwd,
repoUrl: workspace.repoUrl,
baseRef: workspace.baseRef,
branchName: workspace.branchName,
providerType: workspace.providerType,
providerMetadata: readProviderMetadata(workspace.metadata),
});
const requireInCompany = <T extends { companyId: string | null | undefined }>(
entityName: string,
record: T | null | undefined,
companyId: string,
): T => {
if (!inCompany(record, companyId)) {
throw new Error(`${entityName} not found`);
}
return record;
};
/**
* Verify `userId` is an active human member of `companyId` before letting a
* plugin attribute a mutation to them. Mirrors the authorization bar the
* web app's own board routes apply — a plugin can only ever attribute an
* action to an identity that could have taken it in the web app itself.
* Used by any plugin capability that accepts an `actorUserId`
* (`createComment`'s human-attributed path, `respondInteraction`, and
* `approvals.decide`).
*
* All current call sites are non-safe (write) actions, so by default this
* also rejects a `viewer`-role member — the web app's board write-routes
* treat `membershipRole === "viewer"` as read-only and 403 it ("Viewer
* access is read-only", routes/authz.ts:115-116). Without this bar a plugin
* holding `approvals.respond` / `issue.interactions.respond` could attributeView on GitHub (pinned to a7e689b3c3)
Solutions
- Verify the named entity exists for the company; create it first or correct the identifier.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/src/services/plugin-host-services.ts:856 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/af80a070377fb64a.
Report an issue: GitHub.