mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-13 20:36:29 +00:00
Keep original cause in test-before-setup exceptions (#2657)
This commit is contained in:
parent
0a2cfa3fc1
commit
105df90176
@ -28,12 +28,12 @@ async def async_setup_entry(hass: HomeAssistant, entry: MyIntegrationConfigEntry
|
||||
|
||||
try:
|
||||
await client.async_setup()
|
||||
except OfflineException:
|
||||
raise ConfigEntryNotReady("Device is offline")
|
||||
except InvalidAuthException:
|
||||
raise ConfigEntryAuthFailed("Invalid authentication")
|
||||
except AccountClosedException:
|
||||
raise ConfigEntryError("Account closed")
|
||||
except OfflineException as ex:
|
||||
raise ConfigEntryNotReady("Device is offline") from ex
|
||||
except InvalidAuthException as ex:
|
||||
raise ConfigEntryAuthFailed("Invalid authentication") from ex
|
||||
except AccountClosedException as ex:
|
||||
raise ConfigEntryError("Account closed") from ex
|
||||
|
||||
entry.runtime_data = client
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user