{"record":{"id":"a73b631885f8af41","repo":"eyaltoledano/claude-task-master","slug":"not-found-a73b63","errorCode":"NOT_FOUND","errorMessage":"Brief not found or you do not have access","messagePattern":"Brief not found or you do not have access","errorType":"error_code","errorClass":"TaskMasterError","httpStatus":null,"severity":"error","filePath":"packages/tm-core/src/modules/integration/services/export.service.ts","lineNumber":497,"sourceCode":"\t}\n\n\t/**\n\t * Export tasks from a brief ID or URL\n\t */\n\tasync exportFromBriefInput(briefInput: string): Promise<ExportResult> {\n\t\t// Extract brief ID from input\n\t\tconst briefId = this.extractBriefId(briefInput);\n\t\tif (!briefId) {\n\t\t\tthrow new TaskMasterError(\n\t\t\t\t'Invalid brief ID or URL provided',\n\t\t\t\tERROR_CODES.VALIDATION_ERROR\n\t\t\t);\n\t\t}\n\n\t\t// Fetch brief to get organization\n\t\tconst brief = await this.authManager.getBrief(briefId);\n\t\tif (!brief) {\n\t\t\tthrow new TaskMasterError(\n\t\t\t\t'Brief not found or you do not have access',\n\t\t\t\tERROR_CODES.NOT_FOUND\n\t\t\t);\n\t\t}\n\n\t\t// Export with the resolved org and brief\n\t\treturn this.exportTasks({\n\t\t\torgId: brief.accountId,\n\t\t\tbriefId: brief.id\n\t\t});\n\t}\n\n\t/**\n\t * Validate export context before prompting\n\t */\n\tasync validateContext(): Promise<{\n\t\thasOrg: boolean;\n\t\thasBrief: boolean;","sourceCodeStart":479,"sourceCodeEnd":515,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/packages/tm-core/src/modules/integration/services/export.service.ts#L479-L515","documentation":"After extracting the brief ID, exportFromBriefInput() fetches the brief via authManager.getBrief(briefId). If the API returns nothing (brief doesn't exist, was deleted, or the authenticated user lacks access to it), the service throws TaskMasterError with code NOT_FOUND. Note the error deliberately conflates 'not found' and 'no access' to avoid leaking brief existence.","triggerScenarios":"Calling exportFromBriefInput() with a well-formed brief ID that (a) does not exist, (b) was deleted, (c) belongs to another organization the user isn't a member of, or (d) the session's token can't read.","commonSituations":"A teammate shared a brief link but you're logged into a different account/org; the brief was archived or deleted after the URL was saved; typo in the ID that happens to pass validation; stale link from before an org migration.","solutions":["Confirm you are authenticated as the correct user/org (`tm auth status`, `tm context org`).","Verify the brief exists by opening its URL in the web app while logged in.","Ask the brief owner to grant you access or share the correct brief.","If the brief was deleted, create/select a different brief and re-export."],"exampleFix":"// before\nawait exportService.exportFromBriefInput('b-deleted');\n// after — verify access first\nconst brief = await tmCore.auth.getBrief('b-123');\nif (!brief) throw new Error('Brief unavailable — check access or ID');\nawait exportService.exportFromBriefInput('b-123');","handlingStrategy":"try-catch","validationCode":"const brief = await tmCore.auth.getBrief(briefId).catch(() => null);\nif (!brief) {\n  throw new Error(`Brief ${briefId} not found or inaccessible — verify ID, account, and org membership`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await exportService.exportFromBriefInput(briefInput);\n} catch (e) {\n  if (e instanceof TaskMasterError && e.code === ERROR_CODES.NOT_FOUND) {\n    console.error('Brief not found or no access — check you are logged into the right account/org and the brief still exists.');\n    return;\n  }\n  throw e;\n}","preventionTips":["Confirm `tm auth status` shows the account that owns or can access the brief","Open the brief URL in the browser while logged in to verify access before scripting","Check `tm context org` matches the brief's organization","Treat shared links as ephemeral — re-verify after org changes or brief deletions"],"tags":["not-found","export","authorization"],"backgroundTag":"resource-not-found","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}