firefly-limiter - v1.0.1
    Preparing search index...

    Function retryableApiError

    • Whether an error thrown by an ApiClient call is worth repeating, for a policy wrapped around the client rather than around the transport.

      The templates' errors are recognised structurally, by name and shape, so nothing here depends on Aphid or dung beetle being installed: a TransportError is retryable unless the caller aborted it, an HttpError is retryable when its status is in statuses, and a DecodeError never is, because sending the request again will not make the body parse.

      Parameters

      • error: unknown
      • statuses: readonly number[] = retryableStatuses

      Returns boolean