Optionalprops: {OptionalinitialBackoff?: numberbase of the exponential
backoff in milliseconds, default 250. With full jitter the wait before
retry n is drawn uniformly from [0, min(maxBackoff, initialBackoff * 2^n)),
so this is not a floor.
OptionalmaxAttempts?: numberattempts per request (one
initial request plus up to maxAttempts - 1 retries), counted afresh
for every page of a paginated call. Default 5, minimum 1.
OptionalmaxBackoff?: numbercap on the computed backoff in
milliseconds, default 8 s. A Retry-After header is bounded by the
remaining total deadline instead, never by this.
OptionalperAttemptTimeout?: numberbound on one attempt, end
to end, in milliseconds. Default 30 s. 0 means no per-attempt cap;
the total bound still applies.
OptionalretryableStatusCodes?: readonly number[]default
[408, 429, 500, 502, 503, 504].
OptionaltotalDeadline?: numberbound on the whole call, every
page and every backoff included, in milliseconds. 0 (the default)
inherits Client.requestTimeout.
ReadonlyinitialReadonlymaxReadonlymaxReadonlyperReadonlyretryableReadonlytotalStaticDEFAULTThe package default policy.
StaticLOCAL_The default policy for a loopback mirror base URL: maxAttempts: 15
and totalDeadline: 90000, every other field unchanged.
StaticfromNo value resolves to the DEFAULT instance itself, which is how a
Client tells an unset policy from an explicit one.
How a mirror node REST call is retried and bounded.
This is a value, not client state: it is resolved per call as package default, then the
Client's policy, then any per-query setter, and is carried into the call by value. It is separate from the gRPC retry knobs onClient(maxAttempts,minBackoff,maxBackoff), which govern consensus node requests only and are never aliased onto HTTP.Every field has a default, and no construction path yields a partially defaulted instance:
new MirrorNodeHttpRetryPolicy({ maxAttempts: 3 })keeps every other field at its default. Derive a changed copy from an existing value withnew MirrorNodeHttpRetryPolicy({ ...policy, maxAttempts: 3 }).On a loopback mirror base URL (
localhost,127.0.0.1) the package default ismaxAttempts: 15andtotalDeadline: 90000, so a mirror node still starting under a local test harness is waited for. An explicit policy set on the client overrides that as it would anywhere else.