MCPcopy Create free account
hub / github.com/Noumena-Network/code / getRetryAfter

Function getRetryAfter

src/services/api/withRetry.ts:562–571  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

560}
561
562function getRetryAfter(error: unknown): string | null {
563 return (
564 ((error as { headers?: { 'retry-after'?: string } }).headers?.[
565 'retry-after'
566 ] ||
567 // eslint-disable-next-line eslint-plugin-n/no-unsupported-features/node-builtins
568 ((error as APIError).headers as Headers)?.get?.('retry-after')) ??
569 null
570 )
571}
572
573export function getRetryDelay(
574 attempt: number,

Callers 2

withRetryFunction · 0.85
getRetryAfterMsFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected