{"record":{"id":"1f2b52597bb2b94b","repo":"affaan-m/ECC","slug":"missing-work-item-id","errorCode":null,"errorMessage":"Missing work item id.","messagePattern":"Missing work item id\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/work-items.js","lineNumber":438,"sourceCode":"    store = await createStateStore({\n      dbPath: options.dbPath,\n      homeDir: process.env.HOME || os.homedir()\n    });\n\n    if (options.command === 'list') {\n      const payload = store.listWorkItems({ limit: normalizeLimit(options.limit) });\n      if (options.json) {\n        console.log(JSON.stringify(payload, null, 2));\n      } else {\n        printWorkItemList(payload);\n      }\n      return;\n    }\n\n    if (options.command === 'show') {\n      const id = resolveWorkItemId(options);\n      if (!id) {\n        throw new Error('Missing work item id.');\n      }\n      const item = store.getWorkItemById(id);\n      if (!item) {\n        throw new Error(`Work item not found: ${id}`);\n      }\n      if (options.json) {\n        console.log(JSON.stringify(item, null, 2));\n      } else {\n        printWorkItem(item);\n      }\n      return;\n    }\n\n    if (options.command === 'upsert') {\n      const id = resolveWorkItemId(options);\n      const existing = id ? store.getWorkItemById(id) : null;\n      const item = store.upsertWorkItem(buildUpsertPayload(options, existing));\n      if (options.json) {","sourceCodeStart":420,"sourceCodeEnd":456,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/work-items.js#L420-L456","documentation":"The 'show' subcommand of work-items.js needs an item identifier: resolveWorkItemId(options) returned null because neither a positional id nor --id was passed to the CLI.","triggerScenarios":"Thrown at scripts/work-items.js:438 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide the id positionally or via --id when running the show command","Run item list to discover valid work item ids"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}