Skip to content

Commit

Permalink
exception handling fix
Browse files Browse the repository at this point in the history
  • Loading branch information
krisek committed Apr 4, 2023
1 parent 63dc9dd commit 5dc8e2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/modules/backup_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ def main():
)
if response_delete["ResponseMetadata"]["HTTPStatusCode"] == 200:
changed = True
except Exception as e:
module.exit_json(changed=changed, failed=True)
except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e:
module.fail_json_aws(e, msg="Failed to delete selection")
# remove_peer_connection(client, module)
formatted_results = camel_dict_to_snake_dict(response)
# Turn the resource tags from boto3 into an ansible friendly tag dictionary
Expand Down

0 comments on commit 5dc8e2d

Please sign in to comment.