windmill-labs/windmill · error

${label}${jobId}: error checking job status (${consecutiveEr

Error message

${label}${jobId}: error checking job status (${consecutiveErrors}/${MAX_CONSECUTIVE_POLL_ERRORS}): ${err?.message ?? err}

What it means

Retry-loop warning from pollJobWithQueueLogging: the getCompletedJobResultMaybe call for a job failed (network/API error, not job failure). consecutiveErrors tracks how many polls in a row failed against MAX_CONSECUTIVE_POLL_ERRORS; polling continues and the counter resets on the next successful check.

Source

Thrown at cli/src/utils/job_polling.ts:110

  let lastHeartbeatAt = Date.now();
  let consecutiveErrors = 0;

  while (true) {
    try {
      const maybe = await wmill.getCompletedJobResultMaybe({
        workspace,
        id: jobId,
        getStarted: false,
      });

      consecutiveErrors = 0;

      if (maybe.completed) {
        return { result: maybe.result, success: maybe.success ?? false };
      }
    } catch (err: any) {
      consecutiveErrors++;
      log.warn(
        colors.yellow(
          `${label}${jobId}: error checking job status (${consecutiveErrors}/${MAX_CONSECUTIVE_POLL_ERRORS}): ${err?.message ?? err}`,
        ),
      );
      lastHeartbeatAt = Date.now();
      if (consecutiveErrors >= MAX_CONSECUTIVE_POLL_ERRORS) {
        throw new Error(
          `Giving up polling job ${jobId} after ${MAX_CONSECUTIVE_POLL_ERRORS} consecutive errors. Last error: ${err?.message ?? err}`,
        );
      }
    }

    if (Date.now() - lastQueueLogAt >= QUEUE_LOG_INTERVAL_MS) {
      lastQueueLogAt = Date.now();
      const logged = await logQueueStatus(workspace, jobId, label);
      if (logged) lastHeartbeatAt = Date.now();
    }

View on GitHub (pinned to e474e8803c)

Solutions

  1. Check API/server reachability and auth token validity from the CLI environment
  2. Wait — transient errors self-heal as long as the consecutive counter stays under the max
  3. Inspect err.message to distinguish auth (401/403) from connectivity problems
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at cli/src/utils/job_polling.ts:110 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/9e68950159eb08a9. Report an issue: GitHub.