{"record":{"id":"90c5dcd157a14eec","repo":"santifer/career-ops","slug":"getro-entry-name-needs-an-https-careers-url","errorCode":null,"errorMessage":"getro: ${entry.name} needs an https careers_url","messagePattern":"getro: (.+?) needs an https careers_url","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"providers/getro.mjs","lineNumber":208,"sourceCode":"  return parts.join(', ');\n}\n\n/** @type {Provider} */\nexport default {\n  id: 'getro',\n\n  // Getro tenants live on arbitrary vanity domains (careers.atomico.com,\n  // talent.cherry.vc, ...) with no common suffix to auto-detect against.\n  // Still reports a hit when `getro_collection` is set explicitly, so\n  // verify-portals has a probe URL for those entries without a live fetch.\n  detect(entry) {\n    const id = resolveCollectionOverride(entry);\n    return id ? { url: `${API_BASE}/${id}/search/jobs` } : null;\n  },\n\n  async fetch(entry, ctx) {\n    const careersUrl = resolveCareersUrl(entry);\n    if (!careersUrl) throw new Error(`getro: ${entry.name} needs an https careers_url`);\n\n    const collectionId = await resolveCollectionId(entry, ctx, careersUrl);\n    const apiUrl = `${API_BASE}/${collectionId}/search/jobs`;\n\n    const requestedMaxPages = Number.isInteger(entry.getro_max_pages) && entry.getro_max_pages > 0\n      ? Math.min(entry.getro_max_pages, HARD_MAX_PAGES) : DEFAULT_MAX_PAGES;\n    const ctxCap = Number.isInteger(ctx?.maxPages) && ctx.maxPages > 0 ? ctx.maxPages : Infinity;\n    const maxPages = Math.min(requestedMaxPages, ctxCap);\n\n    const maxAgeDays = Number.isFinite(entry.getro_max_age_days) && entry.getro_max_age_days >= 0\n      ? entry.getro_max_age_days : DEFAULT_MAX_AGE_DAYS;\n    const cutoffMs = maxAgeDays > 0 ? Date.now() - maxAgeDays * 86_400_000 : 0;\n\n    const out = [];\n    let total = Infinity;\n    for (let page = 0; page < maxPages && page * HITS_PER_PAGE < total; page++) {\n      if (page > 0) await sleep(INTER_PAGE_DELAY_MS, ctx);\n","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/santifer/career-ops/blob/1696bec4d021768e7359f9aad6b329cba883da20/providers/getro.mjs#L190-L226","documentation":"The getro provider's fetch entry point first resolves the careers URL via resolveCareersUrl(entry), which requires an https careers_url on the entry. If that returns null (missing, non-URL, or non-https), fetch throws this error naming the entry. Getro cannot discover a collection_id without a careers page to scrape.","triggerScenarios":"Calling the getro provider's fetch for an entry that has no careers_url field, an empty string, a relative path, or an http:// (non-https) URL — i.e. any entry for which resolveCareersUrl returns null.","commonSituations":"portals.yml entry added with only a name; careers_url left blank after a template copy; scheme typed as http; URL accidentally nested under the wrong YAML key so the provider sees undefined.","solutions":["Add `careers_url: https://...` (an absolute https URL) to the getro entry in portals.yml.","Upgrade any http:// careers_url to https://.","Check YAML indentation so careers_url lands on the entry object the provider actually reads.","Alternatively provide `getro_collection` if you only want the API path — but the careers_url requirement in fetch remains, so set both as applicable."],"exampleFix":"// before (portals entry)\n{ name: 'Acme', provider: 'getro' }\n// after\n{ name: 'Acme', provider: 'getro', careers_url: 'https://acme.getro.com/careers' }","handlingStrategy":"validation","validationCode":"const u = entry.careers_url && new URL(entry.careers_url);\nif (!u || u.protocol !== 'https:') {\n  throw new Error(`getro entry \"${entry.name}\" requires an absolute https careers_url, got: ${entry.careers_url}`);\n}","typeGuard":"function hasHttpsCareersUrl(entry) {\n  if (typeof entry?.careers_url !== 'string') return false;\n  try { return new URL(entry.careers_url).protocol === 'https:'; } catch { return false; }\n}","tryCatchPattern":"try {\n  await getroProvider.fetch(entry, ctx);\n} catch (e) {\n  if (e.message.includes('needs an https careers_url')) {\n    console.error(`Config error in entry \"${entry.name}\": add careers_url: https://... to portals.yml`);\n    return null;\n  }\n  throw e;\n}","preventionTips":["Require careers_url in your portals.yml schema for getro entries (JSON schema / loader assert).","Normalize http → https at config load time.","Validate all provider entries once at startup and report every missing field together.","Keep a sample entry in the template so the required fields stay visible."],"tags":["config","missing-field","getro","url-validation"],"backgroundTag":"missing-required-argument","analyzedSha":"1696bec4d021768e7359f9aad6b329cba883da20","analyzedAt":"2026-09-01T19:19:23.111Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}