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."""
try:
self.clients = self.ap.get_clients()
except UniFiAPConnectionException:
_LOGGER.error("Failed to connect to accesspoint")
except UniFiAPConnectionException as e:
_LOGGER.error("Failed to connect to accesspoint: %s", str(e))
return False
except UniFiAPDataException:
_LOGGER.error("Failed to get proper response from accesspoint")
except UniFiAPDataException as e:
_LOGGER.error("Failed to get proper response from accesspoint: %s", str(e))
return False
return True