{"record":{"id":"0233db5d945a2e1a","repo":"paperclipai/paperclip","slug":"parent-issue-not-found","errorCode":null,"errorMessage":"Parent issue not found","messagePattern":"Parent issue not found","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"server/src/routes/issues.ts","lineNumber":8820,"sourceCode":"    const result = await ensureArtifactReviewDocumentForWorkProduct({ issue, workProduct, actor });\n    res.status(result.created ? 201 : 200).json(result.document);\n  });\n\n  router.post(\"/issues/:id/low-trust/promotions\", validate(promoteLowTrustOutputSchema), async (req, res) => {\n    const id = req.params.id as string;\n    const issue = await getAccessibleResource(req, res, svc.getById(id), \"Issue not found\");\n    if (!issue) return;\n    if (!(await assertIssueReadAllowed(req, res, issue))) return;\n    if (!(await assertAgentIssueMutationAllowed(req, res, issue))) return;\n    if (!(await assertDeliverableMutationAllowedByRunContext(req, res, issue))) return;\n    const actor = getActorInfo(req);\n    if (await sourceTrustForActorWrite(issue, actor)) {\n      res.status(403).json({ error: \"Low-trust actors cannot promote quarantined output\" });\n      return;\n    }\n    const sourceTrust = await lookupLowTrustSourceArtifact({\n      issueId: issue.id,\n      artifactKind: req.body.sourceArtifactKind,\n      artifactId: req.body.sourceArtifactId,\n    });\n    if (!sourceTrust) {\n      res.status(404).json({ error: \"Low-trust source artifact not found\" });\n      return;\n    }\n    if (!isLowTrustQuarantined(sourceTrust)) {\n      res.status(422).json({ error: \"Source artifact is not quarantined low-trust output\" });\n      return;\n    }\n\n    const promotedAt = new Date();\n    const promotionTrust = buildPromotedSourceTrust({\n      sourceIssueId: issue.id,\n      sourceArtifactKind: req.body.sourceArtifactKind,\n      sourceArtifactId: req.body.sourceArtifactId,\n      promotedByActorType: actor.actorType,\n      promotedByActorId: actor.actorId,","sourceCodeStart":8802,"sourceCodeEnd":8838,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/issues.ts#L8802-L8838","documentation":"404 from issue creation. Fires when the request supplies a parentId whose issue cannot be found (or is not accessible), so the parent lookup returns null and the handler cannot attach the new child issue.","triggerScenarios":"Thrown at server/src/routes/issues.ts:8199 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the id in the request path or body refers to an existing record in this company; re-list the parent collection to get a valid id.","Check that the record was not deleted or archived, and that the request is scoped to the correct companyId."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}