Skip to content

Commit

Permalink
docs: explain v2 and v3 scenarios better
Browse files Browse the repository at this point in the history
  • Loading branch information
james-hu committed Jan 9, 2024
1 parent eb32198 commit 95f098d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/aws-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,10 @@ export abstract class AwsUtils {
}

/**
* Usually you would find `promiseWithRetry(...)` more convenient.
*
* Perform an AWS operation (returning a Promise) with retry.
* This function is quite handy when you are using AWS SDK v3.
* If you are using AWS SDK v2, `promiseWithRetry(...)` could be more convenient.
*
* The retry could happen only if the error coming from AWS has property `retryable`/`$retryable` equals to true.
* If you don't want `retryable`/`$retryable` property to be checked, use `PromiseUtils.withRetry(...)` directly.
* @see promiseWithRetry
Expand Down Expand Up @@ -344,6 +345,9 @@ export abstract class AwsUtils {

/**
* Perform an AWS operation (returning a Request) with retry.
* This function is quite handy when you are using AWS SDK v2.
* If you are using AWS SDK v3, use `withRetry(...)` instead.
*
* The retry could happen only if the error coming from AWS has property `retryable`/`$retryable` equals to true.
* If you don't want `retryable`/`$retryable` property to be checked, use `PromiseUtils.withRetry(...)` directly.
* @param operation the AWS operation that returns a Request, such like `() => apig.getBasePathMappings({ domainName, limit: 500 })`
Expand Down

0 comments on commit 95f098d

Please sign in to comment.