Skip to content

Commit

Permalink
catch WaiterError for cleaner error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
tremble committed Mar 10, 2021
1 parent fca699c commit 032f209
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/modules/ec2_vpc_route_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 032f209

Please sign in to comment.