mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02: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:
|
||||
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…
Reference in a new issue