MCPcopy Index your code
hub / github.com/simstudioai/sim / shouldRetryWithoutReadingBody

Function shouldRetryWithoutReadingBody

apps/sim/tools/index.ts:1509–1519  ·  view source on GitHub ↗
(
  status: number,
  headers: { get(name: string): string | null },
  retryConfig: ResolvedRetryConfig | null | undefined,
  isLastAttempt: boolean
)

Source from the content-addressed store, hash-verified

1507}
1508
1509function shouldRetryWithoutReadingBody(
1510 status: number,
1511 headers: { get(name: string): string | null },
1512 retryConfig: ResolvedRetryConfig | null | undefined,
1513 isLastAttempt: boolean
1514): boolean {
1515 if (!retryConfig || isLastAttempt || !isRetryableFailure(null, status)) {
1516 return false
1517 }
1518 return parseRetryAfterHeader(headers.get('retry-after')) <= retryConfig.maxDelayMs
1519}
1520
1521/**
1522 * Execute a tool request directly

Callers 1

executeToolRequestFunction · 0.85

Calls 3

isRetryableFailureFunction · 0.85
parseRetryAfterHeaderFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected