{"record":{"id":"5414a16e8357a67c","repo":"home-assistant/core","slug":"err-5414a1","errorCode":null,"errorMessage":"err","messagePattern":"err","errorType":"exception","errorClass":"ConfigEntryAuthFailed","httpStatus":null,"severity":"error","filePath":"homeassistant/components/autarco/coordinator.py","lineNumber":69,"sourceCode":"            config_entry=config_entry,\n            name=DOMAIN,\n            update_interval=SCAN_INTERVAL,\n        )\n        self.client = client\n        self.account_site = account_site\n\n    @override\n    async def _async_update_data(self) -> AutarcoData:\n        \"\"\"Fetch data from Autarco API.\"\"\"\n        battery = None\n        try:\n            site = await self.client.get_site(self.account_site.public_key)\n            solar = await self.client.get_solar(self.account_site.public_key)\n            inverters = await self.client.get_inverters(self.account_site.public_key)\n            if site.has_battery:\n                battery = await self.client.get_battery(self.account_site.public_key)\n        except AutarcoAuthenticationError as err:\n            raise ConfigEntryAuthFailed(err) from err\n        except AutarcoConnectionError as err:\n            raise UpdateFailed(err) from err\n        return AutarcoData(\n            solar=solar,\n            inverters=inverters,\n            site=site,\n            battery=battery,\n        )\n","sourceCodeStart":51,"sourceCodeEnd":78,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/autarco/coordinator.py#L51-L78","documentation":"ConfigEntryAuthFailed(err) raised by the autarco coordinator when the autarco library raises AutarcoAuthenticationError during any of the site/solar/inverters/battery fetches. This tells Home Assistant the API key/email pair is invalid or revoked, so the entry enters reauth state (setup error with a Reauthenticate prompt) instead of retrying.","triggerScenarios":"autarco client calls returning 401/403: wrong API key or email in the config entry, key regenerated in the Autarco dashboard, account password changed, subscription lapsing.","commonSituations":"User regenerated the Autarco API key without updating HA; typo in credentials at setup; account access ended (system removed from account).","solutions":["Open Settings > Devices & Services > Autarco > Reauthenticate and re-enter the current email/API key","Verify the key works by calling the Autarco API manually with the same credentials","Confirm the site public key still belongs to this account in the Autarco app"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    await coordinator.async_config_entry_first_refresh()\nexcept ConfigEntryAuthFailed:\n    # push the user to the reauth flow immediately\n    entry.async_start_reauth(hass)","preventionTips":["Regenerate the Autarco API key? Update HA credentials the same day","Treat 401s as config problems, not network problems — never wrap ConfigEntryAuthFailed in retries"],"tags":["autarco","solar","auth","api-key","config-entry"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}