{"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/9b17a8ac97b398a496b38e423ae24e433b43254f/plugins/apify/index.mjs#L167-L203","documentation":"Thrown by the apify provider's `fetch` hook (plugins/apify/index.mjs:185) when a portals.yml entry declares `provider: apify` but has no `actor` field. The actor field tells the plugin which Apify actor to run (e.g. `misceres/indeed-scraper`); without it the provider cannot call runActor. The example in the message (`misceres/indeed-scraper`) shows the expected owner/actor form. This check runs after the token check.","triggerScenarios":"A portals.yml entry has `provider: apify` and a field_map but omits `actor`. The `if (!entry.actor)` guard fires.","commonSituations":"Copy-pasted a portal entry from a non-apify provider and forgot to add `actor`; renamed/removed the actor field accidentally; YAML indentation put actor under the wrong key.","solutions":["Add the `actor` field in owner/actor form to the portals.yml entry.","Find the actor ID on the Apify store URL (the path after /acts/).","Validate YAML indentation so `actor` is a sibling of `provider`, not nested under field_map."],"exampleFix":"# before — portals.yml\n- name: indeed\n  provider: apify\n  field_map: { title: title, url: url }\n  # missing actor\n# after\n- name: indeed\n  provider: apify\n  actor: misceres/indeed-scraper\n  field_map: { title: title, url: url }","handlingStrategy":"validation","validationCode":"// Lint apify entries for a present, well-formed actor field.\nfor (const e of portals.filter(p => p.provider === 'apify')) {\n  if (typeof e.actor !== 'string' || !e.actor.trim()) {\n    throw new Error(`Entry '${e.name}' is missing a required 'actor' (e.g. misceres/indeed-scraper).`);\n  }\n}","typeGuard":"/** @param {unknown} v */\nfunction hasActor(v) {\n  return typeof v?.actor === 'string' && v.actor.trim().length > 0;\n}","tryCatchPattern":"try {\n  await provider.fetch(entry, ctx);\n} catch (err) {\n  if (/missing 'actor'/.test(err.message)) {\n    console.error(`Config error: ${err.message}`);\n    process.exitCode = 2;\n  } else throw err;\n}","preventionTips":["Add a CI lint that every `provider: apify` entry has a non-empty `actor`.","Copy actor IDs from the Apify store URL path."],"tags":["apify","configuration","validation","plugin"],"backgroundTag":null,"analyzedSha":"9b17a8ac97b398a496b38e423ae24e433b43254f","analyzedAt":"2026-08-13T00:48:39.135Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}