Make api authentication errors more verbose.

This commit is contained in:
computercolin 2022-06-08 01:17:39 -06:00
parent ea986d568b
commit 96527276e7

View file

@ -90,8 +90,8 @@ class MikrotikIdempotent():
try:
self.mk.login()
self.login_success = True
except:
self.failed_msg = "Could not log into Mikrotik device." + " Check the username and password.",
except Exception as e:
self.failed_msg = "Could not log into Mikrotik device." + " Check the username and password. Exception {} - {}".format(type(e), e),
else:
self.failed_msg = "Could not access RouterOS api." + " Verify API service is enabled and not blocked by firewall.",