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: try:
self.mk.login() self.mk.login()
self.login_success = True self.login_success = True
except: except Exception as e:
self.failed_msg = "Could not log into Mikrotik device." + " Check the username and password.", self.failed_msg = "Could not log into Mikrotik device." + " Check the username and password. Exception {} - {}".format(type(e), e),
else: else:
self.failed_msg = "Could not access RouterOS api." + " Verify API service is enabled and not blocked by firewall.", self.failed_msg = "Could not access RouterOS api." + " Verify API service is enabled and not blocked by firewall.",