RetryPolicy
Defined in: packages/rest/src/index.ts:217
Configures which REST failures may be retried.
Properties
Section titled “Properties”maxRetries
Section titled “maxRetries”maxRetries:
number
Defined in: packages/rest/src/index.ts:219
Maximum retry attempts.
Methods
Section titled “Methods”getDelay()
Section titled “getDelay()”getDelay(
attempt,retryAfter?):number
Defined in: packages/rest/src/index.ts:223
Calculates delay before the next attempt.
Parameters
Section titled “Parameters”attempt
Section titled “attempt”number
Zero-based retry number.
retryAfter?
Section titled “retryAfter?”number
Server-provided delay, when available.
Returns
Section titled “Returns”number
Delay in milliseconds.
shouldRetry()
Section titled “shouldRetry()”shouldRetry(
method,status):boolean
Defined in: packages/rest/src/index.ts:221
Determines whether a request may be retried.
Parameters
Section titled “Parameters”method
Section titled “method”string
HTTP method.
status
Section titled “status”number
HTTP status, or zero for transport errors.
Returns
Section titled “Returns”boolean
True when retrying is safe under the policy.