{"record":{"id":"f0aaf1bde4024ede","repo":"santifer/career-ops","slug":"apify-entry-entry-name-missing-actor-e-g-m","errorCode":null,"errorMessage":"apify: entry ${entry.name} missing 'actor' (e.g. misceres/indeed-scraper)","messagePattern":"apify: entry (.+?) missing 'actor' \\(e\\.g\\. misceres/indeed-scraper\\)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"plugins/apify/index.mjs","lineNumber":185,"sourceCode":"    if (!out[k]) out[k] = String(v);\n  }\n  return out;\n}\n\n/** The keyed provider hook. Reads APIFY_TOKEN from the plugin's scoped ctx.env. */\nexport default {\n  provider: {\n    id: 'apify',\n    // Keyed providers never auto-detect (the engine also forces this to null).\n    detect() { return null; },\n\n    async fetch(entry, ctx) {\n      const token = ctx?.env?.APIFY_TOKEN || process.env.APIFY_TOKEN;\n      if (!hasToken(token)) {\n        throw new Error('APIFY_TOKEN not set — enable apify in config/plugins.yml and add the token to .env');\n      }\n      if (!entry.actor) {\n        throw new Error(`apify: entry ${entry.name} missing 'actor' (e.g. misceres/indeed-scraper)`);\n      }\n      if (\n        !entry.field_map ||\n        !isFieldSpec(entry.field_map.title) ||\n        !isFieldSpec(entry.field_map.url) ||\n        (entry.field_map.company != null && !isFieldSpec(entry.field_map.company)) ||\n        (entry.field_map.location != null && !isFieldSpec(entry.field_map.location)) ||\n        (entry.field_map.description != null && !isFieldSpec(entry.field_map.description))\n      ) {\n        throw new Error(\n          `apify: entry ${entry.name} has invalid field_map. Each of title, url, company, ` +\n          `location, description must be a string or a non-empty array of strings. title and url are required.`\n        );\n      }\n\n      const opts = { token };\n      if (entry.timeout_ms != null) opts.timeoutMs = entry.timeout_ms;\n      const items = await runActor(entry.actor, entry.input || {}, opts);","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/santifer/career-ops/blob/aac998c7ed7248ea853b720ceeb1fdbeb322fc5d/plugins/apify/index.mjs#L167-L203","documentation":"Config validation in the Apify keyed provider's fetch hook: a job_boards/portals entry is routed to the apify provider but lacks the `actor` field that names which Apify actor to run (e.g. misceres/indeed-scraper). The interpolated name identifies the offending entry. The token check has already passed, so this is purely a missing config key, not a credentials problem.","triggerScenarios":"A config entry in the apify plugin config that lacks the 'actor' key, or has it as an empty string/null — e.g. { name: 'indeed', field_map: {...} } with no actor.","commonSituations":"Hand-editing config/plugins.yml and forgetting the actor field; copying an entry template that lists other fields first; renaming 'actor' to something like 'actorId' by mistake.","solutions":["Add the actor identifier to the entry: actor: misceres/indeed-scraper.","Copy the actor path exactly from its Apify store page (org/name format).","Validate the whole config with the plugin's example entry as a reference."],"exampleFix":"// config before\n- name: indeed\n  field_map: { title: positionName, url: url }\n// after\n- name: indeed\n  actor: misceres/indeed-scraper\n  field_map: { title: positionName, url: url }","handlingStrategy":"validation","validationCode":"for (const entry of apifyEntries) {\n  if (!entry.actor) throw new Error(`entry ${entry.name} missing actor`);\n}","typeGuard":"const hasActor = (e) => typeof e?.actor === 'string' && e.actor.includes('/');","tryCatchPattern":"try {\n  await scanner.run(config);\n} catch (e) {\n  if (String(e.message).includes(\"missing 'actor'\")) {\n    console.error('Fix config: each apify entry needs actor: org/name');\n  }\n  throw e;\n}","preventionTips":["Copy the full example entry from plugin docs when adding new entries.","Validate config at startup with a schema validator (e.g. zod).","Use the actor path copied verbatim from the Apify store page.","Lint YAML config for required keys before committing."],"tags":["apify","config","validation","missing-field"],"backgroundTag":"missing-required-config-field","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"}