{"record":{"id":"174a9c5f1f809020","repo":"paperclipai/paperclip","slug":"document-not-found","errorCode":null,"errorMessage":"Document not found","messagePattern":"Document not found","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"server/src/routes/issues.ts","lineNumber":7417,"sourceCode":"      linkedCases,\n      inboxArchiveFields,\n    ] = await Promise.all([\n      resolveIssueProjectAndGoal(issue),\n      svc.getAncestors(issue.id),\n      svc.findMentionedProjectIds(issue.id, { includeCommentBodies: false }),\n      documentsSvc.getIssueDocumentPayload(issue),\n      svc.getRelationSummaries(issue.id),\n      svc.listBlockerAttention(issue.companyId, [issue]).then((map) => map.get(issue.id) ?? null),\n      svc.listReviewAttention(issue.companyId, [issue]).then((map) => map.get(issue.id) ?? null),\n      svc.listProductivityReviews(issue.companyId, [issue.id]).then((map) => map.get(issue.id) ?? null),\n      issueReferencesSvc.listIssueReferenceSummary(issue.id),\n      listSuccessfulRunHandoffStates(db, issue.companyId, [issue.id]),\n      svc.getCurrentScheduledRetry(issue.id),\n      recoveryActionsSvc.getActiveForIssue(issue.companyId, issue.id),\n      listIssueLinkedCases(db, issue.companyId, issue.id),\n      inboxArchiveFieldsPromise,\n    ]);\n    const recoveryActionsByRelationIssue = await relationRecoveryActionMap(\n      recoveryActionsSvc,\n      issue.companyId,\n      relations,\n    );\n    const relationsWithRecoveryActions = withRecoveryActionsOnRelationSummaries(\n      relations,\n      recoveryActionsByRelationIssue,\n    );\n    const revalidatedActiveRecoveryAction = await revalidateActiveSourceRecoveryForRead({\n      issue,\n      trigger: \"read_projection\",\n      actor: getActorInfo(req),\n      activeRecoveryAction,\n    });\n    const mentionedProjects = mentionedProjectIds.length > 0\n      ? await projectsSvc.listByIds(issue.companyId, mentionedProjectIds)\n      : [];\n    const currentExecutionWorkspace = issue.executionWorkspaceId","sourceCodeStart":7399,"sourceCodeEnd":7435,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/issues.ts#L7399-L7435","documentation":"404 response from GET /issues/:id/documents/:key. Fires when the validated document key parses but no document with that key exists for the issue, so the lookup by (issueId, key) returns null and the handler short-circuits with this error.","triggerScenarios":"Thrown at server/src/routes/issues.ts:6973 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"}