Add logging to NYT Games setup failures (#126832)

This commit is contained in:
Joost Lekkerkerker 2024-09-26 20:33:24 +02:00 committed by GitHub
parent 2a0ad20188
commit ae102f1318
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,7 +9,7 @@ from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
from homeassistant.const import CONF_TOKEN
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from .const import DOMAIN
from .const import DOMAIN, LOGGER
class NYTGamesConfigFlow(ConfigFlow, domain=DOMAIN):
@ -30,6 +30,7 @@ class NYTGamesConfigFlow(ConfigFlow, domain=DOMAIN):
except NYTGamesError:
errors["base"] = "cannot_connect"
except Exception: # noqa: BLE001
LOGGER.exception("Unexpected error")
errors["base"] = "unknown"
else:
await self.async_set_unique_id(str(user_id))