paperclipai/paperclip · error
Document not found
Error message
Document not found
What it means
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.
Source
Thrown at server/src/routes/issues.ts:7417
linkedCases,
inboxArchiveFields,
] = await Promise.all([
resolveIssueProjectAndGoal(issue),
svc.getAncestors(issue.id),
svc.findMentionedProjectIds(issue.id, { includeCommentBodies: false }),
documentsSvc.getIssueDocumentPayload(issue),
svc.getRelationSummaries(issue.id),
svc.listBlockerAttention(issue.companyId, [issue]).then((map) => map.get(issue.id) ?? null),
svc.listReviewAttention(issue.companyId, [issue]).then((map) => map.get(issue.id) ?? null),
svc.listProductivityReviews(issue.companyId, [issue.id]).then((map) => map.get(issue.id) ?? null),
issueReferencesSvc.listIssueReferenceSummary(issue.id),
listSuccessfulRunHandoffStates(db, issue.companyId, [issue.id]),
svc.getCurrentScheduledRetry(issue.id),
recoveryActionsSvc.getActiveForIssue(issue.companyId, issue.id),
listIssueLinkedCases(db, issue.companyId, issue.id),
inboxArchiveFieldsPromise,
]);
const recoveryActionsByRelationIssue = await relationRecoveryActionMap(
recoveryActionsSvc,
issue.companyId,
relations,
);
const relationsWithRecoveryActions = withRecoveryActionsOnRelationSummaries(
relations,
recoveryActionsByRelationIssue,
);
const revalidatedActiveRecoveryAction = await revalidateActiveSourceRecoveryForRead({
issue,
trigger: "read_projection",
actor: getActorInfo(req),
activeRecoveryAction,
});
const mentionedProjects = mentionedProjectIds.length > 0
? await projectsSvc.listByIds(issue.companyId, mentionedProjectIds)
: [];
const currentExecutionWorkspace = issue.executionWorkspaceIdView on GitHub (pinned to 01ad858492)
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.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/src/routes/issues.ts:6973 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/174a9c5f1f809020.
Report an issue: GitHub.