Add better handling for errors causing integration test instability (#40184)

* Add better handling for errors causing integration test instability
This commit is contained in:
Ryan Brown 2018-05-15 15:31:19 -04:00 committed by Sloane Hertel
parent 0dc73e7822
commit ede47910f8
2 changed files with 4 additions and 1 deletions

View file

@ -214,6 +214,8 @@ def create_vgw(client, module):
except botocore.exceptions.WaiterError as e:
module.fail_json(msg="Failed to wait for Vpn Gateway {0} to be available".format(response['VpnGateway']['VpnGatewayId']),
exception=traceback.format_exc())
except client.exceptions.from_code('VpnGatewayLimitExceeded') as e:
module.fail_json(msg="Too many VPN gateways exist in this account.", exception=traceback.format_exc())
except botocore.exceptions.ClientError as e:
module.fail_json(msg=to_native(e), exception=traceback.format_exc())