paperclipai/paperclip · error
Key not found
Error message
Key not found
What it means
Ownership guard on DELETE /agents/:id/keys/:keyId: the key id either does not exist or belongs to a different agent than the one in the path, so the revoke is refused with 404 to avoid revoking across agents.
Source
Thrown at server/src/routes/agents.ts:4753
);
await logActivity(db, {
companyId: existing.companyId,
actorType: actor.actorType,
actorId: actor.actorId,
agentId: actor.agentId,
runId: actor.runId,
agentApiKeyId: actor.agentApiKeyId,
action: "agent.instructions_file_updated",
entityType: "agent",
entityId: existing.id,
details: {
path: result.file.path,
size: result.file.size,
clearLegacyPromptTemplate: req.body.clearLegacyPromptTemplate === true,
},
});
res.json(result.file);
});
router.delete("/agents/:id/instructions-bundle/file", async (req, res) => {
const id = req.params.id as string;
const existing = await getAccessibleResource(req, res, svc.getById(id), "Agent not found");
if (!existing) return;
await assertCanManageInstructionsPath(req, existing);
assertExternalInstructionsAdmin(req, existing);
const relativePath = typeof req.query.path === "string" ? req.query.path : "";
if (!relativePath.trim()) {
res.status(422).json({ error: "Query parameter 'path' is required" });
return;
}
const actor = getActorInfo(req);
const result = await instructions.deleteFile(existing, relativePath);View on GitHub (pinned to 01ad858492)
Solutions
- Verify the key id exists for this agent; list keys and use a valid one.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/src/routes/agents.ts:4209 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18).
Data as JSON: /api/errors/bb90fcae90a800e9.
Report an issue: GitHub.