1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2026-02-15 07:27:13 +00:00

Improve error message clarity by specifying to check supervisor logs (#6250)

* Improve error message clarity by specifying to check supervisor logs with 'ha supervisor logs'

* Fix ruff, supervisor -> Supervisor

---------

Co-authored-by: Jan Čermák <sairon@sairon.cz>
This commit is contained in:
Ashton
2025-11-04 15:12:15 -07:00
committed by GitHub
parent 1448a33dbf
commit d33305379f
3 changed files with 6 additions and 4 deletions

View File

@@ -151,7 +151,7 @@ def api_return_error(
if check_exception_chain(error, DockerAPIError):
message = format_message(message)
if not message:
message = "Unknown error, see supervisor"
message = "Unknown error, see Supervisor logs (check with 'ha supervisor logs')"
match error_type:
case const.CONTENT_TYPE_TEXT:

View File

@@ -98,7 +98,9 @@ class SupervisorJobError:
"""Representation of an error occurring during a supervisor job."""
type_: type[HassioError] = HassioError
message: str = "Unknown error, see supervisor logs"
message: str = (
"Unknown error, see Supervisor logs (check with 'ha supervisor logs')"
)
stage: str | None = None
def as_dict(self) -> dict[str, str | None]:

View File

@@ -198,7 +198,7 @@ async def test_notify_on_change(coresys: CoreSys, ha_ws_client: AsyncMock):
"errors": [
{
"type": "HassioError",
"message": "Unknown error, see supervisor logs",
"message": "Unknown error, see Supervisor logs (check with 'ha supervisor logs')",
"stage": "test",
}
],
@@ -226,7 +226,7 @@ async def test_notify_on_change(coresys: CoreSys, ha_ws_client: AsyncMock):
"errors": [
{
"type": "HassioError",
"message": "Unknown error, see supervisor logs",
"message": "Unknown error, see Supervisor logs (check with 'ha supervisor logs')",
"stage": "test",
}
],