{"record":{"id":"e9a9f114423cc2bc","repo":"paperclipai/paperclip","slug":"issue-costs-are-outside-this-actor-s-authorization","errorCode":null,"errorMessage":"Issue costs are outside this actor's authorization boundary","messagePattern":"Issue costs are outside this actor's authorization boundary","errorType":"http","errorClass":null,"httpStatus":403,"severity":"error","filePath":"server/src/routes/costs.ts","lineNumber":110,"sourceCode":"    assigneeUserId: string | null;\n    status: string;\n  }) {\n    const decision = await access.decide({\n      actor: req.actor,\n      action: \"issue:read\",\n      resource: {\n        type: \"issue\",\n        companyId: issue.companyId,\n        issueId: issue.id,\n        projectId: issue.projectId,\n        parentIssueId: issue.parentId,\n        assigneeAgentId: issue.assigneeAgentId,\n        assigneeUserId: issue.assigneeUserId,\n        status: issue.status,\n      },\n    });\n    if (decision.allowed) return true;\n    res.status(403).json({ error: \"Issue costs are outside this actor's authorization boundary\" });\n    return false;\n  }\n\n  router.post(\"/companies/:companyId/cost-events\", validate(createCostEventSchema), async (req, res) => {\n    const companyId = req.params.companyId as string;\n    assertCompanyAccess(req, companyId);\n\n    if (req.actor.type === \"agent\" && req.actor.agentId !== req.body.agentId) {\n      res.status(403).json({ error: \"Agent can only report its own costs\" });\n      return;\n    }\n\n    const event = await costs.createEvent(companyId, {\n      ...req.body,\n      occurredAt: new Date(req.body.occurredAt),\n    });\n\n    const actor = getActorInfo(req);","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/server/src/routes/costs.ts#L92-L128","documentation":"Error \"Issue costs are outside this actor's authorization boundary\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at server/src/routes/costs.ts:110 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["This is an authorization rule, not a bug: perform the action with an actor that satisfies the stated constraint (board user, the owning agent, or an in-scope resource).","If access should be allowed, verify the actor's credentials/company scope and the resource's ownership before retrying."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}