fix: add better logging when unexpected error is recieved during config

This commit is contained in:
Luke Bonaccorsi 2024-02-25 01:59:12 +00:00
parent a8601bbe90
commit 79892aa98f
1 changed files with 2 additions and 2 deletions

View File

@ -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)