MCPcopy
hub / github.com/triggerdotdev/trigger.dev / shouldRetryForOptions

Function shouldRetryForOptions

packages/core/src/v3/apiClient/core.ts:255–265  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

253 retryOptions?: RetryOptions
254): ShouldRetryResult {
255 function shouldRetryForOptions(): ShouldRetryResult {
256 const retry = { ...defaultRetryOptions, ...retryOptions };
257
258 const delay = calculateNextRetryDelay(retry, attempt);
259
260 if (delay) {
261 return { retry: true, delay };
262 } else {
263 return { retry: false };
264 }
265 }
266
267 // Note this is not a standard header.
268 const shouldRetryHeader = response.headers.get("x-should-retry");

Callers 1

shouldRetryFunction · 0.85

Calls 1

calculateNextRetryDelayFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…