Skip to content

Commit 7f69efb

Browse files
authored
docs: improve documentation for StandardRetryPolicy (#1403)
1 parent a226597 commit 7f69efb

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"id": "7e4f8c08-941c-4ea5-91b3-4c284746c453",
3+
"type": "documentation",
4+
"description": "Improve documentation for [`StandardRetryPolicy`](https://docs.aws.amazon.com/smithy-kotlin/api/latest/runtime-core/aws.smithy.kotlin.runtime.retries.policy/-standard-retry-policy/)"
5+
}

runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/retries/policy/StandardRetryPolicy.kt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,21 @@ package aws.smithy.kotlin.runtime.retries.policy
88
import aws.smithy.kotlin.runtime.ClientException
99
import aws.smithy.kotlin.runtime.SdkBaseException
1010
import aws.smithy.kotlin.runtime.ServiceException
11-
import aws.smithy.kotlin.runtime.ServiceException.*
11+
import aws.smithy.kotlin.runtime.ServiceException.ErrorType
1212
import kotlin.reflect.KClass
1313
import kotlin.reflect.safeCast
1414

1515
/**
16-
* A standard retry policy which attempts to derive information from the Smithy exception hierarchy.
16+
* A basic retry policy for Smithy clients that defines which error conditions are retryable and how. This policy will
17+
* evaluate the following exceptions as retryable:
18+
*
19+
* * Any [ServiceException] with an `sdkErrorMetadata.errorType` of:
20+
* * [ErrorType.Server] (such as internal service errors)
21+
* * [ErrorType.Client] (such as an invalid request, a resource not found, access denied, etc.)
22+
* * Any [SdkBaseException] where `sdkErrorMetadata.isRetryable` is `true` (such as a client-side timeout,
23+
* networking/socket error, etc.)
24+
* * Any [SdkBaseException] where `sdkErrorMetadata.isThrottling` is `true` (such as making too many requests in a short
25+
* amount of time)
1726
*/
1827
public open class StandardRetryPolicy : RetryPolicy<Any?> {
1928
public companion object {

0 commit comments

Comments
 (0)