-
Notifications
You must be signed in to change notification settings - Fork 24
Error rework #489
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
Error rework #489
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I have a few more questions and suggestions
class ModeledError(CallError): | ||
"""Base exception to be used for modeled errors.""" | ||
|
||
fault: Fault = "client" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why default to "client"
instead of None?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modeled errors will always have this defined as the Smithy trait requires it. So this isn't really important either way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
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.