{"record":{"id":"ff567f6a9bbf2676","repo":"makeplane/plane","slug":"issue-not-found","errorCode":null,"errorMessage":"Issue not found","messagePattern":"Issue not found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/web/core/store/issue/issue-details/issue.store.ts","lineNumber":282,"sourceCode":"      [issueId]\n    );\n    await this.rootIssueDetailStore.activity.fetchActivities(workspaceSlug, projectId, issueId);\n    return currentModule;\n  };\n\n  fetchIssueWithIdentifier = async (workspaceSlug: string, project_identifier: string, sequence_id: string) => {\n    const query = {\n      expand: \"issue_reactions,issue_attachments,issue_link,parent\",\n    };\n    const issue = await this.issueService.retrieveWithIdentifier(workspaceSlug, project_identifier, sequence_id, query);\n    const issueIdentifier = `${project_identifier}-${sequence_id}`;\n    const issueId = issue?.id;\n    const projectId = issue?.project_id;\n    const rootWorkItemDetailStore = issue?.is_epic\n      ? this.rootIssueDetailStore.rootIssueStore.epicDetail\n      : this.rootIssueDetailStore.rootIssueStore.issueDetail;\n\n    if (!issue || !projectId || !issueId) throw new Error(\"Issue not found\");\n\n    const issuePayload = this.addIssueToStore(issue);\n    this.rootIssueDetailStore.rootIssueStore.issues.addIssue([issuePayload]);\n\n    // handle parent issue if exists\n    if (issue?.parent && issue?.parent?.id && issue?.parent?.project_id) {\n      this.issueService.retrieve(workspaceSlug, issue.parent.project_id, issue.parent.id).then((res) => {\n        this.rootIssueDetailStore.rootIssueStore.issues.addIssue([res]);\n      });\n    }\n\n    // add identifiers to map\n    rootWorkItemDetailStore.rootIssueStore.issues.addIssueIdentifier(issueIdentifier, issueId);\n\n    // add related data\n    if (issue.issue_reactions) rootWorkItemDetailStore.addReactions(issue.id, issue.issue_reactions);\n    if (issue.issue_link) rootWorkItemDetailStore.addLinks(issue.id, issue.issue_link);\n    if (issue.issue_attachments) rootWorkItemDetailStore.addAttachments(issue.id, issue.issue_attachments);","sourceCodeStart":264,"sourceCodeEnd":300,"githubUrl":"https://github.com/makeplane/plane/blob/1c8a60f858d8472aa56e29994ec1c7926da2c6ce/apps/web/core/store/issue/issue-details/issue.store.ts#L264-L300","documentation":"Thrown by fetchIssueWithIdentifier in the web issue store when retrieveWithIdentifier returns a falsy issue, or one missing id/project_id. The lookup uses workspaceSlug + project_identifier + sequence_id (e.g. 'PLAN-123'); a miss means no issue matches that identifier triple.","triggerScenarios":"Navigating to an issue URL whose identifier does not exist (typo in sequence/identifier), the issue was deleted, the project was moved/renamed so the identifier changed, the user lacks access (some backends return 404 instead of 403 to avoid leaking existence), or the API returned a partial/malformed payload missing id/project_id.","commonSituations":"Old bookmarked link to a deleted issue; pasting a truncated identifier; permission changes that removed the user from the project; cross-workspace link opened by a user without access.","solutions":["Confirm the identifier triple is correct and current (project identifier changes when a project is renamed).","Verify the user has access to the project and the issue is not archived/deleted.","Inspect the network response from retrieveWithIdentifier — a 404 vs 403 vs 200-with-empty-body points to different root causes.","Handle the thrown error in the route to show a 'not found' page instead of crashing the workspace view."],"exampleFix":"// before: throws and propagates upward\nif (!issue || !projectId || !issueId) throw new Error(\"Issue not found\");\n// after: branch on the API outcome and surface a typed result\nif (!issue || !projectId || !issueId) {\n  return { status: 'not-found' } as const;\n}","handlingStrategy":"try-catch","validationCode":"// Validate identifier shape before calling\nconst seqRe = /^-?\\d+$/;\nif (!workspaceSlug || !project_identifier || !seqRe.test(sequence_id)) {\n  showNotFound();\n  return;\n}","typeGuard":"const isResolvedIssue = (i: unknown): i is { id: string; project_id: string } =>\n  typeof i === 'object' && i !== null &&\n  typeof (i as any).id === 'string' &&\n  typeof (i as any).project_id === 'string';","tryCatchPattern":"try { await fetchIssueWithIdentifier(workspaceSlug, project_identifier, sequence_id); }\ncatch (e) { renderNotFoundPage(); }","preventionTips":["Treat a thrown 'Issue not found' as a route-level not-found, not a crash.","Sanitize/validate the sequence_id format before the API call.","Re-check access if the user recently lost project membership."],"tags":["issues","web","lookup","not-found","permissions"],"backgroundTag":null,"analyzedSha":"1c8a60f858d8472aa56e29994ec1c7926da2c6ce","analyzedAt":"2026-08-12T14:44:31.636Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}