mirror of
https://github.com/home-assistant/core.git
synced 2026-04-20 08:29:39 +02:00
Pihole better logging of update errors (#152077)
This commit is contained in:
@@ -129,10 +129,16 @@ async def async_setup_entry(hass: HomeAssistant, entry: PiHoleConfigEntry) -> bo
|
||||
raise ConfigEntryAuthFailed
|
||||
except HoleError as err:
|
||||
if str(err) == "Authentication failed: Invalid password":
|
||||
raise ConfigEntryAuthFailed from err
|
||||
raise UpdateFailed(f"Failed to communicate with API: {err}") from err
|
||||
raise ConfigEntryAuthFailed(
|
||||
f"Pi-hole {name} at host {host}, reported an invalid password"
|
||||
) from err
|
||||
raise UpdateFailed(
|
||||
f"Pi-hole {name} at host {host}, update failed with HoleError: {err}"
|
||||
) from err
|
||||
if not isinstance(api.data, dict):
|
||||
raise ConfigEntryAuthFailed
|
||||
raise ConfigEntryAuthFailed(
|
||||
f"Pi-hole {name} at host {host}, returned an unexpected response: {api.data}, assuming authentication failed"
|
||||
)
|
||||
|
||||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
|
||||
Reference in New Issue
Block a user