diegosouzapw/OmniRoute · error

[BATCH] Item ${item.customId ?? "(no id)"} exceeded 24h retr

Error message

[BATCH] Item ${item.customId ?? "(no id)"} exceeded 24h retry window after ${attempt} attempts — giving up

What it means

Error "[BATCH] Item ${item.customId ?? "(no id)"} exceeded 24h retry window after ${attempt} attempts — giving up" thrown in diegosouzapw/OmniRoute.

Source

Thrown at open-sse/services/batchProcessor.ts:495

  let response: Response = null;
  for (let attempt = 1; attempt <= maxRetries; attempt++) {
    // If the previous attempt got a response, check for rate limit headers and throttle if needed before retrying.
    if (response) {
      const delay = maybeThrottle(response.headers);
      if (delay) {
        await sleep(delay);
      }
    }

    response = await processSingleItem(item, apiKey);

    if (
      (response.status === 429 || response.status === 502 || response.status === 504) &&
      attempt < maxRetries
    ) {
      // Bail if we've been retrying for longer than the allowed window
      if (Date.now() - retryStartedAt >= MAX_RETRY_DURATION_MS) {
        console.warn(
          `[BATCH] Item ${item.customId ?? "(no id)"} exceeded 24h retry window after ${attempt} attempts — giving up`
        );
        return response;
      }
      const delay = getRetryDelayMs(response.headers) ?? getBackoffDelayMs(attempt);
      await sleep(delay);
      continue;
    }

    return response;
  }
}

// G10 (silent-stop fix): individual batch-item dispatches can hang indefinitely
// if the upstream route stalls (no signal/timeout plumbed through). Bound each
// item with a wall-clock timeout so a stuck item fails fast (recorded as an item
// error) instead of freezing the whole batch loop. The orphaned dispatch keeps
// running in the background but can no longer block the batch.

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at open-sse/services/batchProcessor.ts:495 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/9d2eab0ead4ec3b6. Report an issue: GitHub.