Files
Stefan AgnerandClaude Fable 5.1 9dade90527 Model already-installed OS update requests as API errors
Requesting an OS update to the version that is already installed, or to a
version that is installed and only waiting for a reboot, is a client-state
condition: the frontend or CLI offered an update that the OS manager has
already applied. These requests were raised as a plain HassOSUpdateError,
which api_process treats as an unexpected error and reports to Sentry. Over
the last 90 days this accounted for roughly 20k events from about 15k
installations, all of them "Version X is already installed" in one of its
two variants.

Follow the approach used for Core updates in #6915: introduce
HassOSUpdateAlreadyInstalledError and HassOSUpdatePendingRebootError as
HassOSUpdateError subclasses that are also APIError. Both carry an error_key
so the frontend can translate them and the version as an extra field. The
API response keeps the same HTTP 400 status and message text, but the
exceptions no longer reach Sentry.

Fixes SUPERVISOR-28TG

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-15 17:51:33 +02:00
..