{"record":{"id":"8e4f164666e1deef","repo":"home-assistant/core","slug":"service-unavailable","errorCode":null,"errorMessage":"service_unavailable","messagePattern":"service_unavailable","errorType":"exception","errorClass":"UpdateFailed","httpStatus":null,"severity":"warning","filePath":"homeassistant/components/anglian_water/coordinator.py","lineNumber":88,"sourceCode":"        try:\n            await self.api.update(self.config_entry.data[CONF_ACCOUNT_NUMBER])\n            await self._insert_statistics()\n        except ConsentRequiredError as err:\n            async_create_consent_required_issue(\n                self.hass, self.config_entry.data[CONF_ACCOUNT_NUMBER]\n            )\n            raise UpdateFailed(\n                translation_domain=DOMAIN,\n                translation_key=\"consent_required\",\n                retry_after=900.0,\n            ) from err\n        except (ExpiredAccessTokenError, InvalidGrantError) as err:\n            raise ConfigEntryAuthFailed(\n                translation_domain=DOMAIN,\n                translation_key=\"auth_expired\",\n            ) from err\n        except UnknownEndpointError as err:\n            raise UpdateFailed(\n                translation_domain=DOMAIN,\n                translation_key=\"service_unavailable\",\n                retry_after=60.0,\n            ) from err\n        else:\n            async_delete_consent_required_issue(\n                self.hass, self.config_entry.data[CONF_ACCOUNT_NUMBER]\n            )\n\n    async def _insert_statistics(self) -> None:\n        \"\"\"Insert statistics for water meters into Home Assistant.\"\"\"\n        for meter in self.api.meters.values():\n            id_prefix = (\n                f\"{self.config_entry.data[CONF_ACCOUNT_NUMBER]}_{meter.serial_number}\"\n            )\n            usage_statistic_id = f\"{DOMAIN}:{id_prefix}_usage\".lower()\n            _LOGGER.debug(\"Updating statistics for meter %s\", meter.serial_number)\n            name_prefix = (","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/anglian_water/coordinator.py#L70-L106","documentation":"Raised as UpdateFailed (translation service_unavailable, retry_after 60s) when api.update() raises UnknownEndpointError: the Anglian Water API returned an unexpected/unknown response for an endpoint, treated as a transient service problem. The coordinator backs off one minute and retries; last-known entity values persist.","triggerScenarios":"api.update() hitting an endpoint whose response the library cannot parse or that returns an undocumented error code — API version changes, maintenance responses, or 404/5xx pages replacing JSON.","commonSituations":"Anglian Water backend deployments or outages; library (anglian-water API package) lagging behind an API change until an integration update ships.","solutions":["Wait — the 60s retry usually rides out provider blips; check the Anglian Water service status.","If it persists for hours, update Home Assistant so a patched anglian-water library/endpoint mapping is picked up.","Report via GitHub issue with log timeframe if a new API change is suspected."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"except UpdateFailed: accept the 60s retry cadence; only investigate after sustained failures spanning hours.","preventionTips":["Keep HA updated so endpoint-mapping fixes for Anglian Water API changes arrive.","Check provider status before debugging local config for this error."],"tags":["service-unavailable","water","coordinator","update-failed","transient"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}