{"record":{"id":"1d60b9cca424591b","repo":"home-assistant/core","slug":"unknown","errorCode":"unknown","errorMessage":"unknown","messagePattern":"unknown","errorType":"validation","errorClass":"InputValidationError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/bond/config_flow.py","lineNumber":67,"sourceCode":"\n    bond = Bond(\n        data[CONF_HOST],\n        data[CONF_ACCESS_TOKEN],\n        session=async_get_clientsession(hass),\n        requestor_uuid=RequestorUUID.HOME_ASSISTANT,\n    )\n    try:\n        hub = BondHub(bond, data[CONF_HOST])\n        await hub.setup(max_devices=1)\n    except ClientConnectionError as error:\n        raise InputValidationError(\"cannot_connect\") from error\n    except ClientResponseError as error:\n        if error.status == HTTPStatus.UNAUTHORIZED:\n            raise InputValidationError(\"invalid_auth\") from error\n        raise InputValidationError(\"unknown\") from error\n    except Exception as error:\n        _LOGGER.exception(\"Unexpected exception\")\n        raise InputValidationError(\"unknown\") from error\n\n    # Return unique ID from the hub to be stored in the config entry.\n    if not hub.bond_id:\n        raise InputValidationError(\"old_firmware\")\n\n    return hub.bond_id, hub.name\n\n\nclass BondConfigFlow(ConfigFlow, domain=DOMAIN):\n    \"\"\"Handle a config flow for Bond.\"\"\"\n\n    VERSION = 1\n\n    def __init__(self) -> None:\n        \"\"\"Initialize config flow.\"\"\"\n        self._discovered: dict[str, str] = {}\n\n    async def _async_try_automatic_configure(self) -> None:","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/bond/config_flow.py#L49-L85","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    await hub.setup(max_devices=1)\nexcept ClientConnectionError:\n    ...  # cannot_connect path\nexcept ClientResponseError as err:\n    if err.status == HTTPStatus.UNAUTHORIZED:\n        ...  # invalid_auth\n    ...  # unknown: log err.status + err.message verbatim\nexcept Exception:\n    _LOGGER.exception(\"Unexpected exception\")  # traceback is the real diagnostic\n    ...","preventionTips":["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."],"tags":["bond","config-flow","http","unexpected-error","home-assistant"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}