Improve error logging for unifi-ap (#132141)

This commit is contained in:
Tobias Perschon 2024-12-03 13:34:13 +01:00 committed by Franck Nijhof
parent 07196b0fda
commit 8a310cbbf8
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

View File

@ -67,11 +67,11 @@ class UnifiDeviceScanner(DeviceScanner):
"""Update the client info from AP.""" """Update the client info from AP."""
try: try:
self.clients = self.ap.get_clients() self.clients = self.ap.get_clients()
except UniFiAPConnectionException: except UniFiAPConnectionException as e:
_LOGGER.error("Failed to connect to accesspoint") _LOGGER.error("Failed to connect to accesspoint: %s", str(e))
return False return False
except UniFiAPDataException: except UniFiAPDataException as e:
_LOGGER.error("Failed to get proper response from accesspoint") _LOGGER.error("Failed to get proper response from accesspoint: %s", str(e))
return False return False
return True return True