{"record":{"id":"22d244dd82552fec","repo":"jackwener/OpenCLI","slug":"config-22d244","errorCode":"CONFIG","errorMessage":"task id required","messagePattern":"task id required","errorType":"error_code","errorClass":"CliError","httpStatus":null,"severity":"error","filePath":"clis/ones/task.js","lineNumber":38,"sourceCode":"        {\n            name: 'id',\n            type: 'str',\n            required: true,\n            positional: true,\n            help: 'Work item UUID (often 16 chars) from …/task/<id>',\n        },\n        {\n            name: 'team',\n            type: 'str',\n            required: false,\n            help: 'Team UUID (8 chars from …/team/<team>/…), or set ONES_TEAM_UUID',\n        },\n    ],\n    columns: ['uuid', 'summary', 'number', 'status_uuid', 'assign', 'owner', 'project_uuid', 'updated'],\n    func: async (page, kwargs) => {\n        const id = String(kwargs.id ?? '').trim();\n        if (!id) {\n            throw new CliError('CONFIG', 'task id required', 'Pass the work item uuid from the URL path …/task/<id>');\n        }\n        const team = kwargs.team?.trim() ||\n            process.env.ONES_TEAM_UUID?.trim() ||\n            process.env.ONES_TEAM_ID?.trim();\n        if (!team) {\n            throw new CliError('CONFIG', 'team UUID required', 'Use --team <teamUUID> or set ONES_TEAM_UUID (from …/team/<team>/…).');\n        }\n        const path = `team/${team}/task/${encodeURIComponent(id)}/info`;\n        const data = (await onesFetchInPage(page, path, { method: 'GET' }));\n        if (typeof data.uuid !== 'string') {\n            const hint = typeof data.reason === 'string'\n                ? data.reason\n                : 'Use -f json to inspect response; check id length (often 16) and team.';\n            throw new CliError('FETCH_ERROR', `ONES task info: ${hint}`, 'Confirm task uuid and team match the browser URL.');\n        }\n        return [\n            {\n                uuid: String(data.uuid),","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/ones/task.js#L20-L56","documentation":"The `opencli ones task` (single task detail) command requires a work item id, taken from kwargs.id. If the id is missing or empty after trimming it throws CONFIG before any request. The id is the task uuid from the ONES URL path …/task/<id>.","triggerScenarios":"Running `opencli ones task` without --id, or with an empty/whitespace --id value.","commonSituations":"Copy-pasting the full ONES task URL instead of the uuid segment; forgetting the flag in a script; passing a task number (e.g. TT-123) rather than the uuid from the URL path.","solutions":["Pass the work item uuid: opencli ones task --id <uuid>, taken from …/task/<id> in the ONES URL.","Ensure the value is non-empty and is the uuid, not the human-readable task number.","If scripting, quote the id to avoid shell trimming/quoting issues."],"exampleFix":"// before\nopencli ones task\n// after\nopencli ones task --id '9f8e7d6c'  # from .../task/9f8e7d6c","handlingStrategy":"validation","validationCode":"const id = (args.id ?? '').trim();\nif (!id) {\n  throw new Error('Pass the task uuid from the ONES URL …/task/<id>, e.g. --id 9f8e7d6c.');\n}","typeGuard":null,"tryCatchPattern":"try {\n  const task = await opencli.ones.task({ id });\n} catch (e) {\n  if (e.code === 'CONFIG' && e.message === 'task id required') {\n    console.error('Provide --id <taskUuid> (the segment after /task/ in the ONES URL).');\n  } else throw e;\n}","preventionTips":["Copy the uuid from the …/task/<id> URL path, not the display number (e.g. TT-123).","In scripts, assert the id variable is non-empty before invoking the CLI.","Quote the id to avoid shell stripping."],"tags":["config","cli","missing-argument","ones"],"backgroundTag":"missing-required-argument","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}