{"record":{"id":"9d2eab0ead4ec3b6","repo":"diegosouzapw/OmniRoute","slug":"batch-item-item-customid-no-id-exceede","errorCode":null,"errorMessage":"[BATCH] Item ${item.customId ?? \"(no id)\"} exceeded 24h retry window after ${attempt} attempts — giving up","messagePattern":"\\[BATCH\\] Item (.+?) exceeded 24h retry window after (.+?) attempts — giving up","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"open-sse/services/batchProcessor.ts","lineNumber":495,"sourceCode":"  let response: Response = null;\n  for (let attempt = 1; attempt <= maxRetries; attempt++) {\n    // If the previous attempt got a response, check for rate limit headers and throttle if needed before retrying.\n    if (response) {\n      const delay = maybeThrottle(response.headers);\n      if (delay) {\n        await sleep(delay);\n      }\n    }\n\n    response = await processSingleItem(item, apiKey);\n\n    if (\n      (response.status === 429 || response.status === 502 || response.status === 504) &&\n      attempt < maxRetries\n    ) {\n      // Bail if we've been retrying for longer than the allowed window\n      if (Date.now() - retryStartedAt >= MAX_RETRY_DURATION_MS) {\n        console.warn(\n          `[BATCH] Item ${item.customId ?? \"(no id)\"} exceeded 24h retry window after ${attempt} attempts — giving up`\n        );\n        return response;\n      }\n      const delay = getRetryDelayMs(response.headers) ?? getBackoffDelayMs(attempt);\n      await sleep(delay);\n      continue;\n    }\n\n    return response;\n  }\n}\n\n// G10 (silent-stop fix): individual batch-item dispatches can hang indefinitely\n// if the upstream route stalls (no signal/timeout plumbed through). Bound each\n// item with a wall-clock timeout so a stuck item fails fast (recorded as an item\n// error) instead of freezing the whole batch loop. The orphaned dispatch keeps\n// running in the background but can no longer block the batch.","sourceCodeStart":477,"sourceCodeEnd":513,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/services/batchProcessor.ts#L477-L513","documentation":"Error \"[BATCH] Item ${item.customId ?? \"(no id)\"} exceeded 24h retry window after ${attempt} attempts — giving up\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at open-sse/services/batchProcessor.ts:495 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}