From c39a1596d57dc527645aa113a14cd29912733254 Mon Sep 17 00:00:00 2001 From: tronikos Date: Fri, 11 Oct 2024 03:19:34 -0700 Subject: [PATCH] Log exceptions in the config flow of Opower (#128146) log exceptions --- homeassistant/components/opower/config_flow.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/homeassistant/components/opower/config_flow.py b/homeassistant/components/opower/config_flow.py index a9162b060a2..3dafed35030 100644 --- a/homeassistant/components/opower/config_flow.py +++ b/homeassistant/components/opower/config_flow.py @@ -49,8 +49,12 @@ async def _validate_login( try: await api.async_login() except InvalidAuth: + _LOGGER.exception( + "Invalid auth when connecting to %s", login_data[CONF_UTILITY] + ) errors["base"] = "invalid_auth" except CannotConnect: + _LOGGER.exception("Could not connect to %s", login_data[CONF_UTILITY]) errors["base"] = "cannot_connect" return errors