{"record":{"id":"81992b2bd986f778","repo":"santifer/career-ops","slug":"unknown-source-in-sources-source","errorCode":null,"errorMessage":"unknown source in --sources: ${source}","messagePattern":"unknown source in --sources: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"company-funded.mjs","lineNumber":142,"sourceCode":"  }\n  if (!Number.isInteger(opts.months) || opts.months <= 0 || opts.months > 120) {\n    throw new Error('--months must be an integer from 1 to 120');\n  }\n  if (!['date', 'score'].includes(opts.sort)) {\n    throw new Error('--sort must be date or score');\n  }\n  return opts;\n}\n\nfunction parseSources(value) {\n  const out = String(value || '')\n    .split(',')\n    .map((s) => normalizeSourceName(s.trim()))\n    .filter(Boolean);\n  const unique = [...new Set(out)];\n  const allowed = new Set(['techcrunch', 'prnewswire', 'guardian', 'hn']);\n  for (const source of unique) {\n    if (!allowed.has(source)) throw new Error(`unknown source in --sources: ${source}`);\n  }\n  return unique.length ? unique : [...DEFAULT_SOURCES];\n}\n\nfunction normalizeSourceName(value) {\n  const s = String(value || '').toLowerCase().replace(/[_\\s]+/g, '-');\n  if (s === 'hacker-news' || s === 'hackernews' || s === 'hn') return 'hn';\n  return s.replace(/-/g, '');\n}\n\nfunction compact(text) {\n  return String(text || '').replace(/\\s+/g, ' ').trim();\n}\n\nfunction companySlug(name) {\n  return compact(name)\n    .toLowerCase()\n    .replace(/&/g, ' and ')","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/santifer/career-ops/blob/9b17a8ac97b398a496b38e423ae24e433b43254f/company-funded.mjs#L124-L160","documentation":"Error \"unknown source in --sources: ${source}\" thrown in santifer/career-ops.","triggerScenarios":"Thrown at company-funded.mjs:142 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use only the source names listed in --help for --sources.","Remove the unknown source or fix the typo."],"exampleFix":"node company-funded.mjs --sources crunchbase,sec","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b17a8ac97b398a496b38e423ae24e433b43254f","analyzedAt":"2026-08-13T00:48:39.135Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}