1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-23 11:58:49 +00:00

Print the exact reason if the WebSocket event to Core fails (#5609)

* Print the exact reason if the WebSocket event to Core fails

* Improve error at backup end too, fix tests

* Fix text

* Address ruff check issue
This commit is contained in:
Stefan Agner
2025-02-06 18:17:46 +01:00
committed by GitHub
parent 2078044062
commit 7348745049
2 changed files with 8 additions and 7 deletions

View File

@@ -359,7 +359,7 @@ class HomeAssistant(FileConfiguration, CoreSysAttributes):
)
except HomeAssistantWSError as err:
raise HomeAssistantBackupError(
"Preparing backup of Home Assistant Core failed. Check HA Core logs.",
f"Preparing backup of Home Assistant Core failed. Failed to inform HA Core: {str(err)}.",
_LOGGER.error,
) from err
@@ -376,9 +376,10 @@ class HomeAssistant(FileConfiguration, CoreSysAttributes):
resp = await self.websocket.async_send_command(
{ATTR_TYPE: WSType.BACKUP_END}
)
except HomeAssistantWSError:
except HomeAssistantWSError as err:
_LOGGER.warning(
"Error resuming normal operations after backup of Home Assistant Core. Check HA Core logs."
"Error resuming normal operations after backup of Home Assistant Core. Failed to inform HA Core: %s.",
str(err),
)
else:
if resp and not resp.get(ATTR_SUCCESS):