Vertex Viewer SDK
    Preparing search index...

    Function retry

    • Executes and reattempts execution of an asynchronous function if it throws an error. By default, this function will only retry once and reexecute immediately after the previous execution throws. You can configure the number of retry attempts and delays with the maxRetries and delaysInMs options.

      The delaysInMs is an array of delays in milliseconds for each retry attempt. If there are more retry attempts than delays, the last delay will be used.

      Type Parameters

      • T

      Parameters

      • process: () => Promise<T>

        The process to execute.

      • opts: RetryOptions = {}

        Options to configure retry behavior.

      Returns Promise<T>

      A promise that resolves with a successful value, or the original rejected value if the process fails.