Log exception details in sfr_box config flow (#155351)

This commit is contained in:
epenet
2025-10-28 17:42:40 +01:00
committed by GitHub
parent 4e4a0d1e28
commit 2bc6e728a3

View File

@@ -3,6 +3,7 @@
from __future__ import annotations
from collections.abc import Mapping
import logging
from typing import TYPE_CHECKING, Any
from sfrbox_api.bridge import SFRBox
@@ -16,6 +17,8 @@ from homeassistant.helpers.httpx_client import get_async_client
from .const import DEFAULT_HOST, DEFAULT_USERNAME, DOMAIN
_LOGGER = logging.getLogger(__name__)
DATA_SCHEMA = vol.Schema(
{
vol.Required(CONF_HOST, default=DEFAULT_HOST): selector.TextSelector(),
@@ -48,6 +51,7 @@ class SFRBoxFlowHandler(ConfigFlow, domain=DOMAIN):
try:
system_info = await box.system_get_info()
except SFRBoxError:
_LOGGER.exception("Unexpected exception")
errors["base"] = "cannot_connect"
else:
if TYPE_CHECKING: