From 3c87704802278cc65039040d91fc641a16ec2943 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Wed, 26 Nov 2025 20:11:51 +0100 Subject: [PATCH] Handle update errors in automatic Supervisor update task (#6328) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wrap the Supervisor auto-update call with suppress(SupervisorUpdateError) to prevent unhandled exceptions from propagating. When an automatic update fails, errors are already logged by the exception handlers, and there's no meaningful recovery action the scheduler task can take. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude --- supervisor/misc/tasks.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/supervisor/misc/tasks.py b/supervisor/misc/tasks.py index d55917638..ef529efcc 100644 --- a/supervisor/misc/tasks.py +++ b/supervisor/misc/tasks.py @@ -1,5 +1,6 @@ """A collection of tasks.""" +from contextlib import suppress from datetime import datetime, timedelta import logging from typing import cast @@ -13,6 +14,7 @@ from ..exceptions import ( BackupFileNotFoundError, HomeAssistantError, ObserverError, + SupervisorUpdateError, ) from ..homeassistant.const import LANDINGPAGE, WSType from ..jobs.const import JobConcurrency @@ -174,7 +176,11 @@ class Tasks(CoreSysAttributes): "Found new Supervisor version %s, updating", self.sys_supervisor.latest_version, ) - await self.sys_supervisor.update() + + # Errors are logged by the exceptions, we can't really do something + # if an update fails here. + with suppress(SupervisorUpdateError): + await self.sys_supervisor.update() async def _watchdog_homeassistant_api(self): """Create scheduler task for monitoring running state of API.