{"record":{"id":"67d38e579d4f2df5","repo":"affaan-m/ECC","slug":"timeout-ms-must-be-a-positive-number","errorCode":null,"errorMessage":"--timeout-ms must be a positive number","messagePattern":"--timeout-ms must be a positive number","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/ci/supply-chain-advisory-sources.js","lineNumber":387,"sourceCode":"function parseArgs(argv) {\n  const options = {};\n  for (let i = 0; i < argv.length; i += 1) {\n    const arg = argv[i];\n    if (arg === '--help' || arg === '-h') {\n      options.help = true;\n    } else if (arg === '--json') {\n      options.json = true;\n    } else if (arg === '--refresh') {\n      options.refresh = true;\n    } else if (arg === '--strict-refresh') {\n      options.strictRefresh = true;\n      options.refresh = true;\n    } else if (arg === '--generated-at') {\n      options.generatedAt = argv[++i];\n    } else if (arg === '--timeout-ms') {\n      options.timeoutMs = Number(argv[++i]);\n      if (!Number.isFinite(options.timeoutMs) || options.timeoutMs <= 0) {\n        throw new Error('--timeout-ms must be a positive number');\n      }\n    } else if (arg === '--write') {\n      options.writePath = argv[++i];\n      if (!options.writePath) throw new Error('--write requires a path');\n    } else {\n      throw new Error(`Unknown argument: ${arg}`);\n    }\n  }\n  return options;\n}\n\nfunction printHelp() {\n  console.log(`Usage: node scripts/ci/supply-chain-advisory-sources.js [options]\n\nBuild the active supply-chain advisory source report used by the scheduled\nwatch workflow and Linear ITO-57 status updates.\n\nOptions:","sourceCodeStart":369,"sourceCodeEnd":405,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/ci/supply-chain-advisory-sources.js#L369-L405","documentation":"parseArgs validates the value given to --timeout-ms: it throws when the value is missing/NaN or <= 0. The faulting input is the numeric string following --timeout-ms; advisory-source fetching cannot proceed with a non-positive timeout.","triggerScenarios":"Thrown at scripts/ci/supply-chain-advisory-sources.js:387 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a positive integer, e.g. --timeout-ms 30000.","Check the wrapping script for an empty or malformed variable expansion.","Choose a timeout large enough for network advisory fetches."],"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"}