mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-14 04:46: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:
|
try:
|
||||||
await client.async_setup()
|
await client.async_setup()
|
||||||
except OfflineException:
|
except OfflineException as ex:
|
||||||
raise ConfigEntryNotReady("Device is offline")
|
raise ConfigEntryNotReady("Device is offline") from ex
|
||||||
except InvalidAuthException:
|
except InvalidAuthException as ex:
|
||||||
raise ConfigEntryAuthFailed("Invalid authentication")
|
raise ConfigEntryAuthFailed("Invalid authentication") from ex
|
||||||
except AccountClosedException:
|
except AccountClosedException as ex:
|
||||||
raise ConfigEntryError("Account closed")
|
raise ConfigEntryError("Account closed") from ex
|
||||||
|
|
||||||
entry.runtime_data = client
|
entry.runtime_data = client
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user