mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
ec2_snapshot_copy: WaitError and ClientError exception handling (#38072)
This commit is contained in:
parent
67cd641c04
commit
70bcc5ed45
1 changed files with 2 additions and 2 deletions
|
@ -143,9 +143,9 @@ def copy_snapshot(module, ec2):
|
|||
)
|
||||
|
||||
except WaiterError as we:
|
||||
module.fail_json(msg='An error occurred (%s) waiting for the snapshot to become available. (%s)' % (we.message, we.reason))
|
||||
module.fail_json(msg='An error occurred waiting for the snapshot to become available. (%s)' % str(we), exception=traceback.format_exc())
|
||||
except ClientError as ce:
|
||||
module.fail_json(msg=ce.message, exception=traceback.format_exc(), **camel_dict_to_snake_dict(ce.response))
|
||||
module.fail_json(msg=str(ce), exception=traceback.format_exc(), **camel_dict_to_snake_dict(ce.response))
|
||||
|
||||
module.exit_json(changed=True, snapshot_id=snapshot_id)
|
||||
|
||||
|
|
Loading…
Reference in a new issue