• Tries to run specified lambda several times if it throws, passing the last error to on_fail

    Type Parameters

    • T

    Parameters

    • lambda: AsyncLambda<T>

      Lambda function to execute

    • params: RetryParams = {}

      Retry parameters: attempts, attemptInterval, verbose, on_fail

    Returns Promise<RetryResult<T>>

    Result object with ok indicating success and value holding the return value or error holding the last encountered error