mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Raise ConfigEntryNotReady for Neato API error (#54227)
This commit is contained in:
parent
ca2bdfab6b
commit
819131ad21
@ -77,6 +77,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
_LOGGER.debug("API error: %s (%s)", ex.code, ex.message)
|
_LOGGER.debug("API error: %s (%s)", ex.code, ex.message)
|
||||||
if ex.code in (401, 403):
|
if ex.code in (401, 403):
|
||||||
raise ConfigEntryAuthFailed("Token not valid, trigger renewal") from ex
|
raise ConfigEntryAuthFailed("Token not valid, trigger renewal") from ex
|
||||||
|
raise ConfigEntryNotReady from ex
|
||||||
|
|
||||||
neato_session = api.ConfigEntryAuth(hass, entry, implementation)
|
neato_session = api.ConfigEntryAuth(hass, entry, implementation)
|
||||||
hass.data[NEATO_DOMAIN][entry.entry_id] = neato_session
|
hass.data[NEATO_DOMAIN][entry.entry_id] = neato_session
|
||||||
|
Loading…
x
Reference in New Issue
Block a user