Improve error handling for IdempotentParamaterMismatch (#30324)

Ensure all the return variables are correctly populated
and return more info in the error message
This commit is contained in:
Will Thames 2017-09-21 06:42:13 +10:00 committed by ansibot
commit 685267df73

View file

@ -707,7 +707,7 @@ def create(client, subnet_id, allocation_id, client_token=None,
except botocore.exceptions.ClientError as e: except botocore.exceptions.ClientError as e:
if "IdempotentParameterMismatch" in e.message: if "IdempotentParameterMismatch" in e.message:
err_msg = ( err_msg = (
'NAT Gateway does not support update and token has already been provided' 'NAT Gateway does not support update and token has already been provided: ' + str(e)
) )
else: else:
err_msg = str(e) err_msg = str(e)