mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 05:05:09 +02:00
@@ -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),
|
||||||
],
|
],
|
||||||
|
Reference in New Issue
Block a user