{"record":{"id":"29fde97da70ce2e5","repo":"eyaltoledano/claude-task-master","slug":"warning-result-failedcount-tasks-failed-to-imp","errorCode":null,"errorMessage":"Warning: ${result.failedCount} tasks failed to import: ${failedTasks}","messagePattern":"Warning: (.+?) tasks failed to import: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/tm-core/src/modules/integration/services/export.service.ts","lineNumber":715,"sourceCode":"\t\t\t\t},\n\t\t\t\tbody: JSON.stringify(requestBody)\n\t\t\t});\n\n\t\t\tif (!response.ok) {\n\t\t\t\tconst errorText = await response.text();\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`API request failed: ${response.status} - ${errorText}`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst result = (await response.json()) as BulkTasksResponse;\n\n\t\t\tif (result.failedCount > 0) {\n\t\t\t\tconst failedTasks = result.results\n\t\t\t\t\t.filter((r) => !r.success)\n\t\t\t\t\t.map((r) => `${r.externalId}: ${r.error}`)\n\t\t\t\t\t.join(', ');\n\t\t\t\tconsole.warn(\n\t\t\t\t\t`Warning: ${result.failedCount} tasks failed to import: ${failedTasks}`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconsole.log(\n\t\t\t\t`Successfully exported ${result.successCount} of ${result.totalTasks} tasks to brief ${briefId}`\n\t\t\t);\n\t\t} else {\n\t\t\t// Direct Supabase approach is no longer supported\n\t\t\t// The extractTasks method has been removed from SupabaseRepository\n\t\t\t// as we now exclusively use the API endpoint for exports\n\t\t\tthrow new Error(\n\t\t\t\t'Export API endpoint not configured. Please set TM_PUBLIC_BASE_DOMAIN environment variable to enable task export.'\n\t\t\t);\n\t\t}\n\t}\n\n\t/**","sourceCodeStart":697,"sourceCodeEnd":733,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/packages/tm-core/src/modules/integration/services/export.service.ts#L697-L733","documentation":"During export, export.service.ts performExport() sends tasks to an external target (a brief). If some tasks fail on the remote side, it logs a warning listing each failed external ID with its error, while still reporting the successful count separately.","triggerScenarios":"exportTasks() completes with result.failedCount > 0 — individual task pushes to the brief failed (rejected by the API, validation errors, duplicate/missing external IDs) even though the overall export didn't throw.","commonSituations":"Remote API rejects tasks missing required fields, network blips during batch upload, tasks referencing entities that don't exist on the target, rate limiting on large exports.","solutions":["Read the failedTasks list in the warning to see each external ID and its specific error","Fix the underlying data for failed tasks (missing fields, invalid references) and re-run the export","Retry the export if failures were transient (network/rate-limit)","Check API quotas/permissions on the target brief if many tasks fail consistently"],"exampleFix":"// before\nawait exportService.exportTasks(tasks, { briefId }); // ignores partial failures\n// after\nconst result = await exportService.exportTasks(tasks, { briefId });\nconst failed = result.results.filter(r => !r.success);\nif (failed.length) console.error('Retry failed IDs:', failed.map(f => f.externalId));","handlingStrategy":"retry","validationCode":"const invalid = tasks.filter(t => !t.title || !t.id);\nif (invalid.length) throw new Error(`Fix before export: ${invalid.map(t => t.id).join(', ')}`);","typeGuard":null,"tryCatchPattern":"const result = await exportService.exportTasks(tasks, { briefId });\nconst failed = result.results.filter(r => !r.success);\nfor (const f of failed) console.error(`${f.externalId}: ${f.error}`);\nif (failed.length && isTransient(failed)) await exportService.exportTasks(failed.map(f => f.task), { briefId });","preventionTips":["Validate task data against the target API schema before exporting","Batch large exports to avoid rate limiting","Log and monitor failedCount on every export","Keep retry logic for transient network failures"],"tags":["export","partial-failure","api"],"backgroundTag":"partial-import-failure","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}