Raise exception when data can't be fetched in Opensky (#103596)
This commit is contained in:
parent
0fcaa2c581
commit
6276c4483c
1 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@ from __future__ import annotations
|
|||
|
||||
from aiohttp import BasicAuth
|
||||
from python_opensky import OpenSky
|
||||
from python_opensky.exceptions import OpenSkyUnauthenticatedError
|
||||
from python_opensky.exceptions import OpenSkyError
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
|
||||
|
@ -28,7 +28,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
),
|
||||
contributing_user=entry.options.get(CONF_CONTRIBUTING_USER, False),
|
||||
)
|
||||
except OpenSkyUnauthenticatedError as exc:
|
||||
except OpenSkyError as exc:
|
||||
raise ConfigEntryNotReady from exc
|
||||
|
||||
coordinator = OpenSkyDataUpdateCoordinator(hass, client)
|
||||
|
|
Loading…
Add table
Reference in a new issue