Implement retryable() method in exceptions. #3200
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement the
retryable()
method in theAwsServiceException
andSdkServiceException
classes.Motivation and Context
The SDK internally has a way to determine whether an exception is
retryable based on the status code and the error code. This change uses
this existing logic to implement the
retryable()
method of theexception classes so that it no longer returns a static
false
value.Modifications
Implement the
retryable()
method in theAwsServiceException
andSdkServiceException
classes.Testing
Successful build of
./mvnw clean install -pl :aws-core -am
in:Linux 5.4.181-109.354.amzn2int.x86_64 #1 SMP Wed Mar 2 18:58:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
openjdk version "1.8.0_332"
|OpenJDK Runtime Environment (build 1.8.0_332-b08)
|OpenJDK 64-Bit Server VM (build 25.332-b08, mixed mode)
Screenshots (if appropriate)
N/A
Types of changes
Checklist
mvn install
succeedsscripts/new-change
script and following the instructions. Commit the new file created by the script in.changes/next-release
with your changes.License