{"record":{"id":"70097fb5cb190531","repo":"santifer/career-ops","slug":"solidjobs-careers-url-required","errorCode":null,"errorMessage":"solidjobs: careers_url required","messagePattern":"solidjobs: careers_url required","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"providers/solidjobs.mjs","lineNumber":62,"sourceCode":"  detect(entry) {\n    const url = entry.careers_url || '';\n    try {\n      const parsed = new URL(url);\n      if (parsed.hostname === 'solid.jobs' && parsed.pathname.startsWith('/public-api/offers/'))\n        return { url };\n    } catch {}\n    return null;\n  },\n  \n  /**\n   * Fetches and normalizes job offers from the SolidJobs public API.\n   * * @param {{ careers_url?: string, name: string }} entry - The configuration entry being processed.\n   * @param {{ fetchJson: (url: string, opts?: { redirect?: 'error'|'follow'|'manual' }) => Promise<any> }} ctx - HTTP context.\n   * @returns {Promise<Array<{title: string, url: string, company: string, location: string}>>} Array of parsed job offers.\n   */\n  async fetch(entry, ctx) {\n    const url = entry.careers_url;\n    if (!url) throw new Error('solidjobs: careers_url required');\n    assertUrl(url);\n    // redirect:'error' prevents SSRF via server-side redirects\n    const json = await ctx.fetchJson(url, { redirect: 'error' });\n    if (!json || !Array.isArray(json.jobs)) {\n      throw new Error(`solidjobs: unexpected API response — expected { jobs: [...] }, got keys: [${json ? Object.keys(json).join(', ') : 'null'}]`);\n    }\n\n    /** @type {Array<{ title?: string, url?: string, company?: string, locations?: string | string[] }>} */\n    const jobs = json.jobs;\n\n    return jobs\n      .filter(j => j && typeof j === 'object' && typeof j.url === 'string' && j.url.trim() !== '')\n      .map(j => ({\n        title: j.title || '',\n        url: /** @type {string} */ (j.url || '').trim(),\n        company: j.company || entry.name,\n        location: Array.isArray(j.locations) ? j.locations.join(', ') : (typeof j.locations === 'string' ? j.locations : ''),\n      }));","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/santifer/career-ops/blob/9b17a8ac97b398a496b38e423ae24e433b43254f/providers/solidjobs.mjs#L44-L80","documentation":"The first statement in fetch reads entry.careers_url and throws if it is falsy. This fires before assertUrl, so the value is missing entirely (undefined, null, empty string) rather than malformed. The provider requires a careers_url — there is no api: fallback for solidjobs.","triggerScenarios":"A portals.yml entry was added with provider: solidjobs (or was auto-detected) but the careers_url field was omitted, left blank, or mis-indented in YAML so it parsed as null.","commonSituations":"YAML indentation error dropped the key; the entry was templated from another provider and the URL line was forgotten; an empty string was copied in.","solutions":["Add careers_url: https://solid.jobs/public-api/offers/<division> to the entry","Check YAML indentation — careers_url must be a sibling key under the entry, not nested under another field","Confirm the key is spelled exactly careers_url (not career_url or url)"],"exampleFix":"# before\n- name: SolidJobs IT\n  provider: solidjobs\n# after\n- name: SolidJobs IT\n  provider: solidjobs\n  careers_url: https://solid.jobs/public-api/offers/it","handlingStrategy":"validation","validationCode":"// Guard the missing-field case before fetch.\nif (typeof entry.careers_url !== 'string' || !entry.careers_url.trim()) {\n  console.warn(`${entry.name}: solidjobs entry missing careers_url`);\n}","typeGuard":"/** @param {unknown} e @returns {e is {careers_url: string}} */\nfunction hasCareersUrl(e) {\n  return typeof e?.careers_url === 'string' && e.careers_url.trim() !== '';\n}","tryCatchPattern":null,"preventionTips":["Lint provider: solidjobs entries for a non-empty careers_url.","Check YAML indentation so careers_url is a sibling key."],"tags":["config","missing-field","solidjobs","portals-yml"],"backgroundTag":null,"analyzedSha":"9b17a8ac97b398a496b38e423ae24e433b43254f","analyzedAt":"2026-08-13T00:48:39.135Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}