|
29 | 29 | * reason, the service was not able to process it, and returned an error
|
30 | 30 | * response instead.
|
31 | 31 | * <p>
|
32 |
| - * Exceptions that extend {@link SdkServiceException} are assumed to be able to be |
33 |
| - * successfully retried. |
34 |
| - * <p> |
35 | 32 | * SdkServiceException provides callers several pieces of information that can
|
36 | 33 | * be used to obtain more information about the error and why it occurred.
|
37 | 34 | *
|
@@ -83,18 +80,23 @@ public boolean isClockSkewException() {
|
83 | 80 | }
|
84 | 81 |
|
85 | 82 | /**
|
86 |
| - * Specifies whether an exception is caused by throttling. |
| 83 | + * Specifies whether an exception is caused by throttling. This method by default returns {@code true} if the status code is |
| 84 | + * equal to <a href="https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#429">429 Too Many Requests</a> |
| 85 | + * but subclasses can override this method to signal that the specific subclass is considered a throttling exception. |
87 | 86 | *
|
88 |
| - * @return true if the status code is 429, otherwise false. |
| 87 | + * @return true if the exception is classified as throttling, otherwise false. |
| 88 | + * @see #isRetryableException() |
89 | 89 | */
|
90 | 90 | public boolean isThrottlingException() {
|
91 | 91 | return statusCode == HttpStatusCode.THROTTLING;
|
92 | 92 | }
|
93 | 93 |
|
94 | 94 | /**
|
95 |
| - * Specifies whether an exception is retryable. |
| 95 | + * Specifies whether an exception is retryable. This method by default returns {@code false} but subclasses can override this |
| 96 | + * value to signal that the specific subclass is considered retryable. |
96 | 97 | *
|
97 |
| - * @return true if the exception is classified as retryable. |
| 98 | + * @return true if the exception is classified as retryable, otherwise false. |
| 99 | + * @see #isThrottlingException() |
98 | 100 | */
|
99 | 101 | public boolean isRetryableException() {
|
100 | 102 | return false;
|
|
0 commit comments