santifer/career-ops · error · Error
smartrecruiters: cannot derive API URL for ${entry.name}
Error message
smartrecruiters: cannot derive API URL for ${entry.name} What it means
resolveSlug walks entry.api then entry.careers_url and keeps the first value that is a valid HTTPS URL on careers.smartrecruiters.com or jobs.smartrecruiters.com whose first path segment is the company slug. If neither qualifies it returns null, and fetch throws because the postings API URL cannot be built. This is a configuration/detection mismatch: the entry does not expose a recognizable SmartRecruiters careers URL.
Source
Thrown at providers/smartrecruiters.mjs:70
}
function resolveApiUrl(entry) {
const slug = resolveSlug(entry);
return slug ? buildPostingsUrl(slug, 0) : null;
}
/** @type {Provider} */
export default {
id: 'smartrecruiters',
detect(entry) {
const apiUrl = resolveApiUrl(entry);
return apiUrl ? { url: apiUrl } : null;
},
async fetch(entry, ctx) {
const slug = resolveSlug(entry);
if (!slug) throw new Error(`smartrecruiters: cannot derive API URL for ${entry.name}`);
const all = [];
for (let page = 0; page < SR_MAX_PAGES; page++) {
const apiUrl = buildPostingsUrl(slug, page * SR_PAGE_SIZE);
assertSmartRecruitersUrl(apiUrl);
const json = await ctx.fetchJson(apiUrl, { redirect: 'error' });
const parsed = parseSmartRecruitersResponse(json, entry.name);
if (parsed.length === 0) break;
all.push(...parsed);
if (parsed.length < SR_PAGE_SIZE) break; // last page (short)
}
return all;
},
};
/**
* Parse a SmartRecruiters /postings response. Exported for unit tests.
*View on GitHub (pinned to 9b17a8ac97)
Solutions
- Pin the slug explicitly in portals.yml: api: https://careers.smartrecruiters.com/<slug> (keep the branded page as careers_url)
- Alternatively set careers_url to the raw form https://careers.smartrecruiters.com/<slug> or https://jobs.smartrecruiters.com/<slug>
- Verify the slug by opening the careers site and copying the first path segment of any posting URL
- If the company is not on SmartRecruiters, remove provider: smartrecruiters and use the correct provider
Example fix
# before - name: Continental provider: smartrecruiters careers_url: https://jobs.continental.com # after - name: Continental provider: smartrecruiters careers_url: https://jobs.continental.com api: https://careers.smartrecruiters.com/continental
Defensive patterns
Strategy: validation
Validate before calling
// Validate a portal entry resolves a SmartRecruiters slug before handing it to fetch.
import sr from './providers/smartrecruiters.mjs';
const detected = sr.detect(entry);
if (!detected) {
console.warn(`${entry.name}: smartrecruiters cannot derive slug — set api: https://careers.smartrecruiters.com/<slug>`);
} Prevention
- Always run provider.detect(entry) before provider.fetch; null means the entry will throw.
- For branded domains, always pin the slug with api: https://careers.smartrecruiters.com/<slug>.
- Add a config lint pass that flags provider: smartrecruiters entries whose careers_url is not on a SR host and lacks an api: pin.
When it happens
Trigger: entry.careers_url is a branded custom domain (e.g. https://jobs.continental.com) with no api: override; the URL uses http:// instead of https://; the host is not one of the two SR careers hosts; or the path has no slug segment (bare domain root). A manually-added provider: smartrecruiters entry with a non-SR URL also hits this.
Common situations: A company fronts SmartRecruiters behind a branded careers domain and the entry was auto-detected or hand-added with only the branded URL, so the slug cannot be recovered. The documented fix is to pin the slug via api: https://careers.smartrecruiters.com/<slug>.
Related errors
- softgarden: cannot resolve widget URL for ${entry.name}
- successfactors: cannot resolve origin for ${entry.name}
- teamtailor: cannot derive jobs.rss URL for ${fallbackCompany
- tkms: cannot resolve jobs host for ${entry.name}
- workable: cannot derive feed URL for ${entry.name}
AI-assisted analysis of santifer/career-ops@9b17a8ac97 (2026-08-13).
Data as JSON: /api/errors/30a0a8ef6ebe9508.
Report an issue: GitHub.