santifer/career-ops · error · Error
jobbankca: entry " " has no jobbankca.keywords[] and no…
Error message
jobbankca: entry "${entry?.name || '(unnamed)'}" has no jobbankca.keywords[] and no config/profile.yml target_roles to fall back to What it means
The jobbankca provider's fetch() needs search keywords to query the public feed. It first uses the entry's jobbankca.keywords[]; if absent, it falls back to resolveProfileKeywords() (config/profile.yml target_roles, primary[] + archetypes[].name, same convention as vdab.mjs). When both sources are empty it throws, because a keyword-less query would return nothing useful.
Solutions
- Add keywords under the entry's jobbankca block: `jobbankca:\n keywords: ["software engineer", "backend developer"]`
- Or populate config/profile.yml target_roles (primary[] and/or archetypes[].name) so the fallback resolves
- Check YAML nesting — keywords must sit under the jobbankca key of the entry, not at entry top level
- Run with a personalized profile (doctor.mjs flags unpersonalized profiles) before scanning
Example fix
// before (portals.yml)
- name: Job Bank Canada
provider: jobbankca
enabled: true
// after
- name: Job Bank Canada
provider: jobbankca
jobbankca:
keywords: ["software engineer"]
enabled: true Defensive patterns
Strategy: validation
Validate before calling
const keywords = entry?.jobbankca?.keywords ?? [];
if (!keywords.length) {
const profileKw = resolveProfileKeywords();
if (!profileKw.length) throw new Error('no keywords and no profile target_roles');
} Type guard
function hasKeywords(entry) {
return Array.isArray(entry?.jobbankca?.keywords) && entry.jobbankca.keywords.length > 0;
} Try / catch
try {
await jobbankcaProvider.fetch(entry, ctx);
} catch (e) {
if (/no jobbankca\.keywords/.test(e.message)) {
console.error('Add jobbankca.keywords to the portals.yml entry or set target_roles in config/profile.yml');
return [];
}
throw e;
} Prevention
- Personalize config/profile.yml (target_roles) during onboarding — run doctor.mjs to confirm
- Give every keyword-required provider entry its own jobbankca.keywords[] as a safety net
- Check YAML nesting: keywords belongs under the jobbankca key
- Re-run verify-pipeline.mjs after editing portals.yml or profile.yml
When it happens
Trigger: Running a scan with a job_boards entry with provider: jobbankca where (1) the jobbankca: block has no keywords list (or an empty array), and (2) config/profile.yml has no target_roles — primary[] and archetypes[] are all empty/missing.
Common situations: Fresh onboarding where config/profile.yml was never personalized; a renamed/removed target_roles section in profile.yml; an explicit `keywords: []` overriding the fallback; YAML indentation putting keywords under the wrong key.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- arbeitsagentur: entry
- Cannot read benchmarks at
- collage: cannot derive API URL for
- config/profile.yml is empty or invalid YAML: fill it in…
- ⚠️ Could not parse config/profile.yml
AI-assisted analysis of santifer/career-ops@aac998c7ed (2026-09-16).
Data as JSON: /api/errors/662cfe7129d0571a.
Report an issue: GitHub.
Appendix: source
Thrown at providers/jobbankca.mjs:248
}
/** @type {Provider} */
export default {
id: 'jobbankca',
detect(entry) {
return entry?.provider === 'jobbankca' ? { url: FEED_URL } : null;
},
async fetch(entry, ctx) {
let { keywords } = parseJobBankConfig(entry);
// Fall back to config/profile.yml's target_roles when this entry has no
// jobbankca.keywords[] of its own — same convention vdab.mjs uses, so a
// user who already onboarded with target roles doesn't have to duplicate
// them into every keyword-required provider's config by hand.
if (!keywords.length) keywords = resolveProfileKeywords();
if (!keywords.length) {
throw new Error(`jobbankca: entry "${entry?.name || '(unnamed)'}" has no jobbankca.keywords[] and no config/profile.yml target_roles to fall back to`);
}
const entryMaxPages = Number.isInteger(entry?.max_pages) && entry.max_pages > 0
? Math.min(entry.max_pages, MAX_PAGES_CAP)
: DEFAULT_MAX_PAGES;
const maxPages = Math.min(
entryMaxPages,
Number.isInteger(ctx?.maxPages) && ctx.maxPages > 0 ? ctx.maxPages : Infinity,
);
/** @type {Map<string, {title: string, url: string, company: string, location: string, postedAt?: number}>} */
const byUrl = new Map();
const errors = [];
let succeeded = 0;
for (const keyword of keywords) {
let keywordFailed = false;
for (let page = 1; page <= maxPages; page++) {View on GitHub (pinned to aac998c7ed)