home-assistant/core · error · InputValidationError
unknown
unknown
Error message
unknown
What it means
Catch-all failure in the Bond config flow: BondHub.setup() raised a ClientResponseError with any status other than 401 (e.g. 404, 500, 503), or any unexpected exception (logged with a traceback via _LOGGER.exception before raising). It means the hub spoke HTTP but the API call itself failed in an unclassified way.
Source
Thrown at homeassistant/components/bond/config_flow.py:67
bond = Bond(
data[CONF_HOST],
data[CONF_ACCESS_TOKEN],
session=async_get_clientsession(hass),
requestor_uuid=RequestorUUID.HOME_ASSISTANT,
)
try:
hub = BondHub(bond, data[CONF_HOST])
await hub.setup(max_devices=1)
except ClientConnectionError as error:
raise InputValidationError("cannot_connect") from error
except ClientResponseError as error:
if error.status == HTTPStatus.UNAUTHORIZED:
raise InputValidationError("invalid_auth") from error
raise InputValidationError("unknown") from error
except Exception as error:
_LOGGER.exception("Unexpected exception")
raise InputValidationError("unknown") from error
# Return unique ID from the hub to be stored in the config entry.
if not hub.bond_id:
raise InputValidationError("old_firmware")
return hub.bond_id, hub.name
class BondConfigFlow(ConfigFlow, domain=DOMAIN):
"""Handle a config flow for Bond."""
VERSION = 1
def __init__(self) -> None:
"""Initialize config flow."""
self._discovered: dict[str, str] = {}
async def _async_try_automatic_configure(self) -> None:View on GitHub (pinned to 58a3fdb3ea)
Solutions
- Open Home Assistant logs and read the 'Unexpected exception' traceback — it identifies the real underlying error.
- Confirm the target really is a Bond hub: curl http://<host>:30001/v2/devices should return Bond JSON.
- Update the bond-api dependency / Home Assistant to pick up fixes, then retry.
- If the hub returned 5xx, retry after the hub is idle; reboot the hub if it persists.
Defensive patterns
Strategy: try-catch
Try / catch
try:
await hub.setup(max_devices=1)
except ClientConnectionError:
... # cannot_connect path
except ClientResponseError as err:
if err.status == HTTPStatus.UNAUTHORIZED:
... # invalid_auth
... # unknown: log err.status + err.message verbatim
except Exception:
_LOGGER.exception("Unexpected exception") # traceback is the real diagnostic
... Prevention
- Always read the logged traceback before guessing at this catch-all error.
- Smoke-test the endpoint with curl before running the config flow against a new host.
- Keep the bond-api library version aligned with what the integration pins.
When it happens
Trigger: Pointing the flow at a non-Bond device or reverse proxy that returns 404/500 on /v2/devices; hub returning 503 while busy; a bug in the bond-api library or an unexpected Python exception during setup. The full traceback is in the Home Assistant log at the moment this error appears.
Common situations: Wrong device address (another IoT gadget on the same IP), hub firmware returning unexpected payloads, a proxy/HTTPS endpoint where the plain local API is expected.
Related errors
- cannot_connect
- invalid_auth
- old_firmware
- The bond API returned an error calling set_power_state_belie
- The bond API returned an error calling set_speed_belief for
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/1d60b9cca424591b.
Report an issue: GitHub.