{"record":{"id":"aa887864117acf6e","repo":"home-assistant/core","slug":"error-fetching-data","errorCode":"error_fetching_data","errorMessage":"Error fetching data","messagePattern":"Error fetching data","errorType":"exception","errorClass":"UpdateFailed","httpStatus":null,"severity":"warning","filePath":"homeassistant/components/aws_s3/coordinator.py","lineNumber":66,"sourceCode":"            hass,\n            _LOGGER,\n            config_entry=entry,\n            name=DOMAIN,\n            update_interval=SCAN_INTERVAL,\n        )\n        self.client = client\n        self._bucket: str = entry.data[CONF_BUCKET]\n        self._prefix: str = entry.data.get(CONF_PREFIX, \"\")\n\n    @override\n    async def _async_update_data(self) -> SensorData:\n        \"\"\"Fetch data from AWS S3.\"\"\"\n        try:\n            backups = await async_list_backups_from_s3(\n                self.client, self._bucket, self._prefix\n            )\n        except BotoCoreError as error:\n            raise UpdateFailed(\n                translation_domain=DOMAIN,\n                translation_key=\"error_fetching_data\",\n            ) from error\n\n        all_backups_size = sum(b.size for b in backups)\n        return SensorData(\n            all_backups_size=all_backups_size,\n        )\n","sourceCodeStart":48,"sourceCodeEnd":75,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/aws_s3/coordinator.py#L48-L75","documentation":"Raised as UpdateFailed (translation_key error_fetching_data) by the aws_s3 S3DataUpdateCoordinator when listing backups from S3 (async_list_backups_from_s3) raises BotoCoreError. The sensor update fails gracefully and retries on the next coordinator interval.","triggerScenarios":"The coordinator's periodic refresh calls list_objects_v2/GetObjects over the bucket prefix and boto3 raises: credentials invalidated since setup, endpoint unreachable, throttling, or bucket deleted.","commonSituations":"Access key deleted after setup worked; MinIO endpoint down; bucket removed; intermittent network to the storage backend.","solutions":["Check connectivity and credentials with aws s3 ls s3://<bucket>/<prefix> using the same keys.","If keys were rotated, re-enter them via the integration's reconfigure/re-auth flow (setup validated them once; runtime may now fail).","If the bucket was deleted or renamed, update the config entry accordingly.","Transient network errors self-heal on the next coordinator refresh."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"from homeassistant.helpers.update_coordinator import UpdateFailed\n\ntry:\n    data = await coordinator.async_refresh()\nexcept UpdateFailed:\n    data = coordinator.data  # serve last known sizes; sensor shows stale until next success","preventionTips":["Validate S3 access after any credential rotation — setup-time success does not guarantee runtime.","Keep bucket lifecycle rules intentional so listing doesn't drift from expectations.","Treat repeating UpdateFailed as a signal to re-test keys against the bucket."],"tags":["home-assistant","aws","s3","coordinator","sensor"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}