mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 13:47:35 +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,
|
||||
)
|
||||
|
||||
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
|
||||
|
||||
|
||||
@ -45,9 +45,8 @@ async def validate_user_input(
|
||||
raise SchemaFlowError("invalid_auth") from err
|
||||
raise SchemaFlowError("cannot_connect") from err
|
||||
except Fault as fault:
|
||||
raise SchemaFlowError(
|
||||
f"Fault {fault.faultCode}: {fault.faultString}"
|
||||
) from fault
|
||||
LOGGER.exception(f"Fault {fault.faultCode}: {fault.faultString}")
|
||||
raise SchemaFlowError("unknown") from fault
|
||||
except ClientConnectionError as err:
|
||||
raise SchemaFlowError("cannot_connect") from err
|
||||
except Exception as err:
|
||||
|
@ -74,7 +74,7 @@ async def test_form_user(
|
||||
(Exception, "unknown"),
|
||||
(
|
||||
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