Improve error handling for IdempotentParamaterMismatch (#30324)

Ensure all the return variables are correctly populated
and return more info in the error message
pull/30650/head
Will Thames 7 years ago committed by ansibot
parent d3e85bd045
commit 685267df73

@ -707,13 +707,13 @@ def create(client, subnet_id, allocation_id, client_token=None,
except botocore.exceptions.ClientError as e:
if "IdempotentParameterMismatch" in e.message:
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:
err_msg = str(e)
success = False
changed = False
result = None
success = False
changed = False
result = None
return success, changed, err_msg, result

Loading…
Cancel
Save