mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 23:27:37 +00:00
Fix incorrect error strings in webmin (#128448)
This commit is contained in:
parent
5d079aacd6
commit
6442625a9d
@ -26,7 +26,7 @@ from homeassistant.helpers.schema_config_entry_flow import (
|
|||||||
SchemaFlowFormStep,
|
SchemaFlowFormStep,
|
||||||
)
|
)
|
||||||
|
|
||||||
from .const import DEFAULT_PORT, DEFAULT_SSL, DEFAULT_VERIFY_SSL, DOMAIN
|
from .const import DEFAULT_PORT, DEFAULT_SSL, DEFAULT_VERIFY_SSL, DOMAIN, LOGGER
|
||||||
from .helpers import get_instance_from_options, get_sorted_mac_addresses
|
from .helpers import get_instance_from_options, get_sorted_mac_addresses
|
||||||
|
|
||||||
|
|
||||||
@ -45,9 +45,8 @@ async def validate_user_input(
|
|||||||
raise SchemaFlowError("invalid_auth") from err
|
raise SchemaFlowError("invalid_auth") from err
|
||||||
raise SchemaFlowError("cannot_connect") from err
|
raise SchemaFlowError("cannot_connect") from err
|
||||||
except Fault as fault:
|
except Fault as fault:
|
||||||
raise SchemaFlowError(
|
LOGGER.exception(f"Fault {fault.faultCode}: {fault.faultString}")
|
||||||
f"Fault {fault.faultCode}: {fault.faultString}"
|
raise SchemaFlowError("unknown") from fault
|
||||||
) from fault
|
|
||||||
except ClientConnectionError as err:
|
except ClientConnectionError as err:
|
||||||
raise SchemaFlowError("cannot_connect") from err
|
raise SchemaFlowError("cannot_connect") from err
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
|
@ -74,7 +74,7 @@ async def test_form_user(
|
|||||||
(Exception, "unknown"),
|
(Exception, "unknown"),
|
||||||
(
|
(
|
||||||
Fault("5", "Webmin module net does not exist"),
|
Fault("5", "Webmin module net does not exist"),
|
||||||
"Fault 5: Webmin module net does not exist",
|
"unknown",
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user