santifer/career-ops · error · Error

arbeitsagentur: all ${keywords.length} keyword request(s) fa

Error message

arbeitsagentur: all ${keywords.length} keyword request(s) failed — ${errors[0]}

What it means

Arbeitsagentur runs one request per keyword and tolerates individual failures (some keywords can legitimately return zero). This error fires only on a *total outage*: `succeeded === 0` (no keyword request succeeded) while `errors.length > 0`. The message surfaces the first error so the root cause is visible. A legitimately-empty search does not trigger this — emptiness is keyed off success count, not result size.

Source

Thrown at providers/arbeitsagentur.mjs:253

        wide
          .map(normalizeJob)
          .filter(Boolean)
          .filter(job => !byRef.has(job.refnr))
          .map(job => [job.refnr, job]),
      ).values()];
      for (const job of wideJobs) {
        if (remoteMatch !== 'filter' || REMOTE_RE.test(job.title)) {
          job.location = job.location ? `${job.location} · Deutschlandweit (Homeoffice)` : 'Deutschlandweit (Homeoffice)';
        }
        if (!byRef.has(job.refnr)) byRef.set(job.refnr, job);
      }
    }

    // Total outage = every primary request failed. A keyword that answered with
    // zero results is not an outage, so key off the success count, not the
    // deduped result size — otherwise a legitimately-empty search throws.
    if (succeeded === 0 && errors.length) {
      throw new Error(`arbeitsagentur: all ${keywords.length} keyword request(s) failed — ${errors[0]}`);
    }

    return [...byRef.values()].map(({ refnr, ...job }) => job);
  },
};

View on GitHub (pinned to 9b17a8ac97)

Solutions

  1. Read the appended first error (`errors[0]`) — it is the actual failure (network, status, parse) repeated across keywords.
  2. Check connectivity to the Arbeitsagentur API host and verify the endpoint URL is still valid.
  3. If rate-limited, reduce concurrency/keyword count and retry after a cooldown.
  4. Confirm a single keyword works in isolation to rule out a config issue vs. an outage.

Example fix

// before — any partial failure aborts everything
if (errors.length) throw new Error(`arbeitsagentur: failed — ${errors[0]}`);

// after — only a total outage throws, surfacing the first error
if (succeeded === 0 && errors.length) {
  throw new Error(`arbeitsagentur: all ${keywords.length} keyword request(s) failed — ${errors[0]}`);
}
Defensive patterns

Strategy: retry

Validate before calling

// Pre-flight connectivity check to the Arbeitsagentur API before fanning out keywords
try {
  await ctx.fetchJson(buildProbeUrl(), { timeoutMs: 5000 });
} catch (e) {
  throw new Error(`arbeitsagentur: API unreachable in pre-flight (${e.message}) — aborting before keyword fan-out`);
}

Try / catch

try {
  // per-keyword requests collecting into `errors`/`succeeded`
} catch (err) {
  errors.push(err); // individual failures are tolerated
}
if (succeeded === 0 && errors.length) {
  // total outage — retry once with backoff, then surface errors[0]
  throw new Error(`arbeitsagentur: all ${keywords.length} keyword request(s) failed — ${errors[0]}`);
}

Prevention

When it happens

Trigger: Every primary keyword request threw an error and none succeeded. `errors[0]` is attached to the thrown message. Triggered by network failure, DNS issues, the Arbeitsagentur Jobsuche API being down, or all requests being blocked (e.g. by rate-limiting / IP ban).

Common situations: Total network outage, the Jobsuche API endpoint changed or is under maintenance, the scanner's IP got rate-limited/blocked across all keywords, or a misconfigured proxy breaks every outbound request.

Related errors


AI-assisted analysis of santifer/career-ops@9b17a8ac97 (2026-08-13). Data as JSON: /api/errors/a5486b8dc7bbb357. Report an issue: GitHub.