From 032f209907e505a02e13ace1f27eb344839d2345 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Wed, 10 Mar 2021 09:55:21 +0100 Subject: [PATCH] catch WaiterError for cleaner error messages --- plugins/modules/ec2_vpc_route_table.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/modules/ec2_vpc_route_table.py b/plugins/modules/ec2_vpc_route_table.py index 1a25db43e47..1ef10e89ceb 100644 --- a/plugins/modules/ec2_vpc_route_table.py +++ b/plugins/modules/ec2_vpc_route_table.py @@ -700,6 +700,8 @@ def ensure_route_table_present(connection, module): ).wait( RouteTableIds=[route_table['RouteTableId']], ) + except botocore.exceptions.WaiterError as e: + module.fail_json_aws(e, msg='Timeout waiting for route table creation') except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: module.fail_json_aws(e, msg="Error creating route table") else: