{"record":{"id":"f891454059257458","repo":"santifer/career-ops","slug":"beesite-cannot-resolve-search-host-for-entry-na","errorCode":null,"errorMessage":"beesite: cannot resolve search host for ${entry.name}","messagePattern":"beesite: cannot resolve search host for (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"providers/beesite.mjs","lineNumber":153,"sourceCode":"function resolveMaxPages(entry) {\n  const v = entry?.max_pages;\n  if (Number.isInteger(v) && v > 0) return Math.min(v, MAX_PAGES);\n  return MAX_PAGES;\n}\n\n/** @type {Provider} */\nexport default {\n  id: 'beesite',\n\n  detect(entry) {\n    const url = entry.api || entry.careers_url || '';\n    if (typeof url !== 'string') return null;\n    return resolveConfig({ api: url }) ? { url } : null;\n  },\n\n  async fetch(entry, ctx) {\n    const cfg = resolveConfig(entry);\n    if (!cfg) throw new Error(`beesite: cannot resolve search host for ${entry.name}`);\n\n    const wait = (ms) => (ctx.sleep ? ctx.sleep(ms) : new Promise((r) => setTimeout(r, ms)));\n    const maxPages = resolveMaxPages(entry);\n    const jobs = [];\n    const seen = new Set();\n    let total = null;\n\n    for (let page = 0; page < maxPages; page++) {\n      if (page > 0) await wait(PAGE_DELAY_MS);\n      const json = await ctx.fetchJson(buildSearchUrl(cfg, page * PAGE_SIZE + 1), {\n        redirect: 'error',\n        headers: { accept: 'application/json' },\n      });\n      const { total: pageTotal, rows } = parseSearchResult(json);\n      if (total === null) total = pageTotal;\n      if (rows.length === 0) break; // past the last page\n\n      let fresh = 0;","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/santifer/career-ops/blob/aac998c7ed7248ea853b720ceeb1fdbeb322fc5d/providers/beesite.mjs#L135-L171","documentation":"The beesite provider's fetch() calls resolveConfig(entry) to determine the search host (beesite instances are per-customer deployments). When it returns null — no usable api/search URL on a recognized beesite origin — the provider throws and skips nothing silently.","triggerScenarios":"Calling fetch(entry) with an entry lacking an `api` URL (or a url that resolveConfig can't map) — e.g. only a corporate careers page or an endpoint on a domain resolveConfig doesn't recognize as a beesite host.","commonSituations":"portals.yml entry for a public-sector/beesite-hosted board where the actual search endpoint URL was never captured; the customer's beesite host changed; entry copied from a provider with a different config shape.","solutions":["Add the entry's explicit `api:` (search endpoint) URL for its beesite instance — resolveConfig accepts a url-shaped api value.","Open the company's job board and copy the actual search request URL (DevTools network tab) into the config.","If the beesite deployment moved, update the host in the entry to the new origin.","Pre-validate: run resolveConfig across all beesite entries at startup and report unresolvable ones before scanning."],"exampleFix":"// before\n{ name: 'ExampleOrg', careers_url: 'https://exampleco.jobs' }\n// fetch throws: cannot resolve search host\n\n// after\n{ name: 'ExampleOrg', api: 'https://exampleco.beesite.com/search?query=' }","handlingStrategy":"fallback","validationCode":"function hasBeesiteHost(entry) {\n  return resolveConfig(entry) != null;\n}","typeGuard":"function isBeesiteReadyEntry(entry) {\n  const cfg = entry ? resolveConfig(entry) : null;\n  return cfg != null && typeof cfg.searchUrl === 'string' && cfg.searchUrl.startsWith('https://');\n}","tryCatchPattern":"try {\n  return await beesiteProvider.fetch(entry, ctx);\n} catch (err) {\n  if (/cannot resolve search host/.test(err.message)) {\n    console.warn(`Entry ${entry.name}: no recognizable beesite search endpoint — check portals.yml`);\n    return null;\n  }\n  throw err;\n}","preventionTips":["Copy the real beesite search request URL from the board's DevTools network tab into `api:`.","Re-check the host when a customer's beesite deployment moves or rebrands.","Pre-validate beesite entries with resolveConfig at startup.","Don't reuse another provider's entry shape for beesite boards."],"tags":["config","beesite","provider","search-host"],"backgroundTag":"missing-config-value","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"}