Skip to content
This repository has been archived by the owner on Jul 28, 2021. It is now read-only.

Add handling for AuthFailure exceptions when describing instances or snapshots #91

Merged
merged 1 commit into from
Apr 25, 2019

Conversation

johnctitus
Copy link
Contributor

Related to issue #70

An unexpected region was being returned by the describe_regions call. Attempts to call describe_instances from this new endpoint were throwing a AuthFailure Client Error. This change updates the existing error handling to explicitly catch ClientErrors, and if the previously handled error (OptInRequired) or the new error (AuthFailure) are encountered, we will assume no instances\snapshots in the region.

@johnctitus johnctitus added the WIP label Apr 25, 2019
Copy link
Contributor

@martinb3 martinb3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Should we be concerend that Rackers may configure backups against an unsupported region? Perhaps there's some kind of validation we could do when they push a config, like calling the existing sanity check logic? That would at least point out that they've configured backups but no EC2 instances matched.

@johnctitus
Copy link
Contributor Author

That's a good call out. Let me push that out to a new issue to track, and we can look into adding the sanity checks.

@johnctitus johnctitus merged commit c55f840 into master Apr 25, 2019
@johnctitus johnctitus deleted the jct-AuthFailure-fix branch April 25, 2019 14:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants