-
Notifications
You must be signed in to change notification settings - Fork 885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding attempt count to error message #5834
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
L-Applin
reviewed
Jan 30, 2025
core/sdk-core/src/test/java/software/amazon/awssdk/core/exception/SdkExceptionMessageTest.java
Outdated
Show resolved
Hide resolved
...sdk-core/src/test/java/software/amazon/awssdk/core/client/handler/SyncClientHandlerTest.java
Outdated
Show resolved
Hide resolved
core/sdk-core/src/main/java/software/amazon/awssdk/core/exception/SdkDiagnostics.java
Outdated
Show resolved
Hide resolved
core/sdk-core/src/main/java/software/amazon/awssdk/core/exception/SdkDiagnostics.java
Outdated
Show resolved
Hide resolved
core/sdk-core/src/main/java/software/amazon/awssdk/core/exception/SdkException.java
Outdated
Show resolved
Hide resolved
...k-core/src/test/java/software/amazon/awssdk/core/client/AsyncClientHandlerExceptionTest.java
Outdated
Show resolved
Hide resolved
zoewangg
reviewed
Feb 4, 2025
...aws-core/src/test/java/software/amazon/awssdk/awscore/exception/AwsServiceExceptionTest.java
Outdated
Show resolved
Hide resolved
...aws-core/src/test/java/software/amazon/awssdk/awscore/exception/AwsServiceExceptionTest.java
Outdated
Show resolved
Hide resolved
...src/test/java/software/amazon/awssdk/services/retry/ExceptionAttemptMessageBehaviorTest.java
Outdated
Show resolved
Hide resolved
a6257f7
to
4016b9c
Compare
L-Applin
reviewed
Feb 6, 2025
core/sdk-core/src/main/java/software/amazon/awssdk/core/exception/SdkException.java
Outdated
Show resolved
Hide resolved
L-Applin
approved these changes
Feb 7, 2025
zoewangg
reviewed
Feb 7, 2025
core/sdk-core/src/main/java/software/amazon/awssdk/core/exception/SdkServiceException.java
Outdated
Show resolved
Hide resolved
core/sdk-core/src/main/java/software/amazon/awssdk/core/exception/SdkServiceException.java
Show resolved
Hide resolved
491381f
to
209d1c7
Compare
zoewangg
reviewed
Feb 12, 2025
codegen/src/main/java/software/amazon/awssdk/codegen/poet/model/ExceptionProperties.java
Outdated
Show resolved
Hide resolved
core/sdk-core/src/main/java/software/amazon/awssdk/core/exception/SdkException.java
Outdated
Show resolved
Hide resolved
core/sdk-core/src/main/java/software/amazon/awssdk/core/exception/SdkException.java
Show resolved
Hide resolved
c34f21a
to
5899b24
Compare
zoewangg
reviewed
Feb 14, 2025
core/sdk-core/src/main/java/software/amazon/awssdk/core/exception/SdkClientException.java
Outdated
Show resolved
Hide resolved
zoewangg
reviewed
Feb 14, 2025
core/aws-core/src/main/java/software/amazon/awssdk/awscore/exception/AwsServiceException.java
Outdated
Show resolved
Hide resolved
5899b24
to
7e4e4aa
Compare
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation and Context
Improve debugging visibility by making attempt count immediately visible in exception messages. Currently, attempt information is only available through suppressed exceptions, requiring additional code to access. This change makes attempts visible directly in the exception message, matching behavior in other AWS SDKs.
Modifications
SdkException
AwsServiceException
to include attempts in AWS error detailsRetryableStageHelper
to track and propagate attempt counts during retriesTesting
ExceptionAttemptMessageBehaviorTest
testing with different retry scenariosAwsServiceExceptionTest
andSdkExceptionSerializationTest
to verify attempt count behaviorSdkExceptionMessageTest
for new attempt count functionalityVisualization of changes:
Before change:
After change:
Potential Impact:
Test or error handling code that relies on exact exception message matching might break as messages now include attempt count. We recommend using partial message matching for more resilient tests and error handling.