createRetryPredicate
createRetryPredicate(
errorTypes): (error,attempt) =>boolean
Defined in: packages/middleware/src/retry.ts:277
Create a retry predicate that only retries specific error types. Note: maxAttempts is enforced by the middleware loop, not this function.
Parameters
Section titled “Parameters”errorTypes
Section titled “errorTypes”("rate_limit" | "network" | "server")[]
Returns
Section titled “Returns”(
error,attempt):boolean
Parameters
Section titled “Parameters”unknown
attempt
Section titled “attempt”number
Returns
Section titled “Returns”boolean