Function retryNetworkOperation

  • Retries a network operation run in a callback.

    Returns

    the result of the network operation

    Throws

    If after maxAttempts the callback still throws ConnectionError

    Type Parameters

    • T

    Parameters

    • maxAttempts: number

      maximum attempts to try

    • callback: (() => Promise<T>)

      callback that returns a promise of the network operation. If rejected with ConnectionError, it will be retried by calling the callback again.

        • (): Promise<T>
        • Returns Promise<T>

    Returns Promise<T>

Generated using TypeDoc