mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 07:01:22 -07:00
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:
parent
d3e85bd045
commit
685267df73
1 changed files with 4 additions and 4 deletions
|
@ -707,13 +707,13 @@ 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)
|
||||||
success = False
|
success = False
|
||||||
changed = False
|
changed = False
|
||||||
result = None
|
result = None
|
||||||
|
|
||||||
return success, changed, err_msg, result
|
return success, changed, err_msg, result
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue