eyaltoledano/claude-task-master · error · TaskMasterError

NOT_FOUND

NOT_FOUND

Error message

Brief not found or you do not have access

What it means

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.

Source

Thrown at packages/tm-core/src/modules/integration/services/export.service.ts:497

	}

	/**
	 * Export tasks from a brief ID or URL
	 */
	async exportFromBriefInput(briefInput: string): Promise<ExportResult> {
		// Extract brief ID from input
		const briefId = this.extractBriefId(briefInput);
		if (!briefId) {
			throw new TaskMasterError(
				'Invalid brief ID or URL provided',
				ERROR_CODES.VALIDATION_ERROR
			);
		}

		// Fetch brief to get organization
		const brief = await this.authManager.getBrief(briefId);
		if (!brief) {
			throw new TaskMasterError(
				'Brief not found or you do not have access',
				ERROR_CODES.NOT_FOUND
			);
		}

		// Export with the resolved org and brief
		return this.exportTasks({
			orgId: brief.accountId,
			briefId: brief.id
		});
	}

	/**
	 * Validate export context before prompting
	 */
	async validateContext(): Promise<{
		hasOrg: boolean;
		hasBrief: boolean;

View on GitHub (pinned to c0c98d367c)

Solutions

  1. Confirm you are authenticated as the correct user/org (`tm auth status`, `tm context org`).
  2. Verify the brief exists by opening its URL in the web app while logged in.
  3. Ask the brief owner to grant you access or share the correct brief.
  4. If the brief was deleted, create/select a different brief and re-export.

Example fix

// before
await exportService.exportFromBriefInput('b-deleted');
// after — verify access first
const brief = await tmCore.auth.getBrief('b-123');
if (!brief) throw new Error('Brief unavailable — check access or ID');
await exportService.exportFromBriefInput('b-123');
Defensive patterns

Strategy: try-catch

Validate before calling

const brief = await tmCore.auth.getBrief(briefId).catch(() => null);
if (!brief) {
  throw new Error(`Brief ${briefId} not found or inaccessible — verify ID, account, and org membership`);
}

Try / catch

try {
  await exportService.exportFromBriefInput(briefInput);
} catch (e) {
  if (e instanceof TaskMasterError && e.code === ERROR_CODES.NOT_FOUND) {
    console.error('Brief not found or no access — check you are logged into the right account/org and the brief still exists.');
    return;
  }
  throw e;
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29). Data as JSON: /api/errors/a73b631885f8af41. Report an issue: GitHub.