@aster-rpc/aster API Reference
    Preparing search index...

    Class RetryInterceptor

    Automatic retry for idempotent methods.

    Implements

    Index

    Constructors

    Methods

    • Decide if a call should be retried. Returns true if the error is retryable, call is idempotent, and attempts remain.

      Parameters

      • error: RpcError
      • attempt: number
      • idempotent: boolean = false

      Returns boolean

    • Compute backoff duration in seconds for the given attempt number.

      Parameters

      • attempt: number

      Returns number