-
Notifications
You must be signed in to change notification settings - Fork 313
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
[Resolve #1519] PoC for centralised exception handling #1525
base: master
Are you sure you want to change the base?
Conversation
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.
I think handling in connection manager seems like the right place therefore i think i prefer this over PR #1522. However instead of using this approach how about we switch to a cleaner approach using aws-error-utils which i found here https://stackoverflow.com/a/33663484
@@ -463,8 +468,21 @@ def call( | |||
if kwargs is None: # pragma: no cover | |||
kwargs = {} | |||
|
|||
client = self._get_client(service, region, profile, stack_name, sceptre_role) | |||
return getattr(client, command)(**kwargs) | |||
# Centralised exception handling where he catch some confusing errors from the Boto3 |
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.
he/we?
I am not sure I like that idea, as it introduces a dependency on a third party project and, by the looks of it, has not been committed to in over a year I agree with you that handling all of these exceptions is going to lead to some bloat and we may eventually need another helper method but I think we'll figure it out and keep the code clean? |
What do you think @dboitnot ? |
Proof of concept for centralised exception handling.
See also #1522
PR Checklist
[Resolve #issue-number]
.poetry run tox
) are passing.poetry run pre-commit run --all-files
).and description in grammatically correct, complete sentences.
Approver/Reviewer Checklist
Other Information
Guide to writing a good commit