mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
parent
616f6aab76
commit
d78c0bd948
@ -506,6 +506,14 @@ async def get_unifi_controller(
|
|||||||
)
|
)
|
||||||
raise CannotConnect from err
|
raise CannotConnect from err
|
||||||
|
|
||||||
|
except aiounifi.Forbidden as err:
|
||||||
|
LOGGER.warning(
|
||||||
|
"Access forbidden to UniFi Network at %s, check access rights: %s",
|
||||||
|
config[CONF_HOST],
|
||||||
|
err,
|
||||||
|
)
|
||||||
|
raise AuthenticationRequired from err
|
||||||
|
|
||||||
except aiounifi.LoginRequired as err:
|
except aiounifi.LoginRequired as err:
|
||||||
LOGGER.warning(
|
LOGGER.warning(
|
||||||
"Connected to UniFi Network at %s but login required: %s",
|
"Connected to UniFi Network at %s but login required: %s",
|
||||||
|
@ -465,6 +465,7 @@ async def test_get_unifi_controller_verify_ssl_false(hass: HomeAssistant) -> Non
|
|||||||
(aiounifi.RequestError, CannotConnect),
|
(aiounifi.RequestError, CannotConnect),
|
||||||
(aiounifi.ResponseError, CannotConnect),
|
(aiounifi.ResponseError, CannotConnect),
|
||||||
(aiounifi.Unauthorized, AuthenticationRequired),
|
(aiounifi.Unauthorized, AuthenticationRequired),
|
||||||
|
(aiounifi.Forbidden, AuthenticationRequired),
|
||||||
(aiounifi.LoginRequired, AuthenticationRequired),
|
(aiounifi.LoginRequired, AuthenticationRequired),
|
||||||
(aiounifi.AiounifiException, AuthenticationRequired),
|
(aiounifi.AiounifiException, AuthenticationRequired),
|
||||||
],
|
],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user