Improve plug-in update error message (#5695)

The current error message does not share any information about the
underlying problem why updating failed. Print the error to the logs.
This commit is contained in:
Stefan Agner 2025-02-28 15:34:35 +01:00 committed by GitHub
parent 77523f7bec
commit 53d97ce0c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -93,17 +93,18 @@ class PluginManager(CoreSysAttributes):
continue continue
_LOGGER.info( _LOGGER.info(
"%s does not have the latest version %s, updating", "Plugin %s is not up-to-date, latest version %s, updating",
plugin.slug, plugin.slug,
plugin.latest_version, plugin.latest_version,
) )
try: try:
await plugin.update() await plugin.update()
except HassioError: except HassioError as ex:
_LOGGER.error( _LOGGER.error(
"Can't update %s to %s, the Supervisor healthy could be compromised!", "Can't update %s to %s: %s",
plugin.slug, plugin.slug,
plugin.latest_version, plugin.latest_version,
str(ex),
) )
self.sys_resolution.create_issue( self.sys_resolution.create_issue(
IssueType.UPDATE_FAILED, IssueType.UPDATE_FAILED,