Retry on more Plex connection failures during startup (#69822)
This commit is contained in:
parent
bc2ba8e1c8
commit
016f67b855
2 changed files with 3 additions and 2 deletions
|
@ -159,7 +159,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
entry.data[CONF_SERVER],
|
||||
error,
|
||||
)
|
||||
return False
|
||||
# Retry as setups behind a proxy can return transient 404 or 502 errors
|
||||
raise ConfigEntryNotReady from error
|
||||
|
||||
_LOGGER.debug(
|
||||
"Connected to: %s (%s)", plex_server.friendly_name, plex_server.url_in_use
|
||||
|
|
|
@ -63,7 +63,7 @@ async def test_setup_config_entry_with_error(hass, entry):
|
|||
await hass.async_block_till_done()
|
||||
|
||||
assert len(hass.config_entries.async_entries(const.DOMAIN)) == 1
|
||||
assert entry.state is ConfigEntryState.SETUP_ERROR
|
||||
assert entry.state is ConfigEntryState.SETUP_RETRY
|
||||
|
||||
|
||||
async def test_setup_with_insecure_config_entry(hass, entry, setup_plex_server):
|
||||
|
|
Loading…
Add table
Reference in a new issue