Error rework#489
Merged
Merged
Conversation
This updates exceptions to embed necessary retry info. This will allow any layer that has access to the exception to set or utilize it without having to have additional interfaces and hooks. This does not modify the retry strategy interface or implementation, that will come in a follow-up.
7fcec38 to
1fa23bd
Compare
1fa23bd to
e2eaf9d
Compare
jonathan343
reviewed
Apr 29, 2025
Contributor
jonathan343
left a comment
There was a problem hiding this comment.
Dropping some initial comments after reviewing the design doc and python code.
PEP8 prefers that we have "Error" as the suffix for errors, which makes sense in a world where exceptions are regularly used for control flow.
61ad78b to
a9f5063
Compare
jonathan343
reviewed
Apr 30, 2025
Contributor
jonathan343
left a comment
There was a problem hiding this comment.
Looks good! I have a few more questions and suggestions
| class ModeledError(CallError): | ||
| """Base exception to be used for modeled errors.""" | ||
|
|
||
| fault: Fault = "client" |
Contributor
There was a problem hiding this comment.
Why default to "client" instead of None?
Contributor
Author
There was a problem hiding this comment.
Modeled errors will always have this defined as the Smithy trait requires it. So this isn't really important either way
This file contains hidden or 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
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.
This updates exceptions to embed necessary retry info. This will allow any layer that has access to the exception to set or utilize it without having to have additional interfaces and hooks.
I included a design doc to explain things in a durable way
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.