{"record":{"id":"d8c711e0b2bc0687","repo":"santifer/career-ops","slug":"getonbrd-out-length-categories-configured-ca","errorCode":null,"errorMessage":"getonbrd: ${out.length} categories configured — cap is ${MAX_CATEGORIES} (each one costs up to max_pages requests)","messagePattern":"getonbrd: (.+?) categories configured — cap is (.+?) \\(each one costs up to max_pages requests\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"providers/getonbrd.mjs","lineNumber":68,"sourceCode":"  const raw = entry?.categories !== undefined ? entry.categories : entry?.category;\n  if (raw === undefined || raw === null) return [DEFAULT_CATEGORY];\n\n  const list = Array.isArray(raw) ? raw : [raw];\n  const out = [];\n  for (const c of list) {\n    if (typeof c !== 'string' || !CATEGORY_SLUG_RE.test(c.trim())) {\n      throw new Error(\n        `getonbrd: invalid category ${JSON.stringify(c)} — expected a slug like \"programming\" or \"machine-learning-ai\"`,\n      );\n    }\n    const slug = c.trim();\n    if (!out.includes(slug)) out.push(slug);\n  }\n  if (!out.length) {\n    throw new Error('getonbrd: `categories` is empty — omit it to use the \"programming\" default');\n  }\n  if (out.length > MAX_CATEGORIES) {\n    throw new Error(\n      `getonbrd: ${out.length} categories configured — cap is ${MAX_CATEGORIES} (each one costs up to max_pages requests)`,\n    );\n  }\n  return out;\n}\n\n/** @param {string} url */\nfunction assertGetonbrdUrl(url) {\n  let parsed;\n  try {\n    parsed = new URL(url);\n  } catch {\n    throw new Error(`getonbrd: invalid URL: ${url}`);\n  }\n  if (parsed.protocol !== 'https:') throw new Error(`getonbrd: URL must use HTTPS: ${url}`);\n  if (parsed.hostname !== TRUSTED_HOST) {\n    throw new Error(`getonbrd: untrusted hostname \"${parsed.hostname}\" — must be ${TRUSTED_HOST}`);\n  }","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/santifer/career-ops/blob/aac998c7ed7248ea853b720ceeb1fdbeb322fc5d/providers/getonbrd.mjs#L50-L86","documentation":"resolveCategories caps the number of categories at MAX_CATEGORIES because each category costs up to max_pages HTTP requests per scan; too many categories multiplies request volume and risks rate limiting. The error reports the actual count and the cap.","triggerScenarios":"Configuring more than MAX_CATEGORIES valid slugs in a Getonboard entry's categories list — e.g. pasting the portal's entire category taxonomy into one entry.","commonSituations":"Bulk-migrating an old config that listed dozens of categories; a script that appends categories without dedup/capping; misunderstanding that each category is a separate paginated request chain, not a server-side filter.","solutions":["Trim the list to the MAX_CATEGORIES most relevant slugs (the cap value is in the error).","Run multiple board entries with disjoint category subsets if broad coverage is genuinely needed.","Trade categories against max_pages: fewer categories with more pages may cover the same volume within the cap.","Raise MAX_CATEGORIES in providers/getonbrd.mjs only if you accept the multiplied request cost and rate-limit risk."],"exampleFix":"# before\ncategories: [programming, data-science, machine-learning-ai, design, marketing, sales, finance, devops, mobile, qa]  # 10 > cap\n# after\ncategories: [programming, data-science, machine-learning-ai, devops]  # within cap","handlingStrategy":"validation","validationCode":"if ((cfg.categories || []).length > MAX_CATEGORIES) throw new Error(`Cap is ${MAX_CATEGORIES} categories per Getonboard entry`);","typeGuard":"const withinCategoryCap = (c) => !Array.isArray(c.categories) || c.categories.length <= MAX_CATEGORIES;","tryCatchPattern":"try { resolveCategories(entry); } catch (e) { if (e.message.includes('cap is')) console.error(e.message, '— split into multiple entries or trim the list'); throw e; }","preventionTips":["Pick the highest-signal categories instead of enumerating the taxonomy","Split broad coverage across multiple board entries","Remember the cost model: requests = categories × max_pages","Dedup the category list before saving config"],"tags":["config","validation","limits","rate-limit"],"backgroundTag":"value-out-of-range","analyzedSha":"aac998c7ed7248ea853b720ceeb1fdbeb322fc5d","analyzedAt":"2026-09-16T06:35:29.214Z","contentChangedAt":"2026-09-16T06:35:29.214Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}