From 79892aa98f696cd697dba52ff2931d4b116c0b16 Mon Sep 17 00:00:00 2001 From: Luke Bonaccorsi Date: Sun, 25 Feb 2024 01:59:12 +0000 Subject: [PATCH] fix: add better logging when unexpected error is recieved during config --- custom_components/robovac/config_flow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/robovac/config_flow.py b/custom_components/robovac/config_flow.py index f355d87..74344fd 100644 --- a/custom_components/robovac/config_flow.py +++ b/custom_components/robovac/config_flow.py @@ -153,8 +153,8 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): errors["base"] = "cannot_connect" except InvalidAuth: errors["base"] = "invalid_auth" - except Exception: # pylint: disable=broad-except - _LOGGER.exception("Unexpected exception") + except Exception as e: # pylint: disable=broad-except + _LOGGER.exception("Unexpected exception: {}".format(e)) errors["base"] = "unknown" else: await self.async_set_unique_id(unique_id)