mirror of
https://github.com/home-assistant/core.git
synced 2025-11-11 03:50:55 +00:00
Log exception details in sfr_box config flow (#155351)
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from collections.abc import Mapping
|
from collections.abc import Mapping
|
||||||
|
import logging
|
||||||
from typing import TYPE_CHECKING, Any
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
from sfrbox_api.bridge import SFRBox
|
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
|
from .const import DEFAULT_HOST, DEFAULT_USERNAME, DOMAIN
|
||||||
|
|
||||||
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
DATA_SCHEMA = vol.Schema(
|
DATA_SCHEMA = vol.Schema(
|
||||||
{
|
{
|
||||||
vol.Required(CONF_HOST, default=DEFAULT_HOST): selector.TextSelector(),
|
vol.Required(CONF_HOST, default=DEFAULT_HOST): selector.TextSelector(),
|
||||||
@@ -48,6 +51,7 @@ class SFRBoxFlowHandler(ConfigFlow, domain=DOMAIN):
|
|||||||
try:
|
try:
|
||||||
system_info = await box.system_get_info()
|
system_info = await box.system_get_info()
|
||||||
except SFRBoxError:
|
except SFRBoxError:
|
||||||
|
_LOGGER.exception("Unexpected exception")
|
||||||
errors["base"] = "cannot_connect"
|
errors["base"] = "cannot_connect"
|
||||||
else:
|
else:
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
|
|||||||
Reference in New Issue
Block a user