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:
@@ -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:
|
||||
|
||||
@@ -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]:
|
||||
|
||||
@@ -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",
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user