influxdb_user: Fixed unhandled exception on invalid login credentials
(cherry picked from commit 498fbc88aa
)
This commit is contained in:
parent
4730aaedb0
commit
1b7908c233
2 changed files with 4 additions and 1 deletions
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
bugfixes:
|
||||
- influxdb_user - Fixed unhandled exception when using invalid login credentials (https://github.com/ansible/ansible/issues/50131)
|
|
@ -93,7 +93,7 @@ def find_user(module, client, user_name):
|
|||
if u_name['user'] == user_name:
|
||||
name = u_name
|
||||
break
|
||||
except ansible.module_utils.urls.ConnectionError as e:
|
||||
except (ansible.module_utils.urls.ConnectionError, influx.exceptions.InfluxDBClientError) as e:
|
||||
module.fail_json(msg=str(e))
|
||||
return name
|
||||
|
||||
|
|
Loading…
Reference in a new issue