Skip to content

Documentation / @etherfold/core / isRetryable

Function: isRetryable() ​

isRetryable(error): boolean

Defined in: packages/core/src/errors.ts:38

Whether waiting could turn this failure into a success.

The one place that reads the flag, so that "anything without the property is retried" is decided once rather than in each loop that asks. Structural on purpose (see RetryableError): an error that crossed a package boundary from a second copy of this module still classifies correctly, and so does one from a package that declares the flag without importing this type -- which is what @etherfold/state-store does, having no dependencies at all.

Every driver that retries on a timer owes its errors this question. A loop that does not ask it turns a permanent refusal into an infinite retry, which is silent: the work is re-attempted for ever and nothing reports a failure.

Parameters ​

error ​

unknown

Returns ​

boolean