Skip to content

Commit

Permalink
Avoid leaking exception trace for philips_js (home-assistant#97491)
Browse files Browse the repository at this point in the history
Avoid leaking exception trace
  • Loading branch information
elupus committed Jul 31, 2023
1 parent 787486b commit 651d413
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions homeassistant/components/philips_js/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
import logging
from typing import Any

from haphilipsjs import AutenticationFailure, ConnectionFailure, PhilipsTV
from haphilipsjs import (
AutenticationFailure,
ConnectionFailure,
GeneralFailure,
PhilipsTV,
)
from haphilipsjs.typing import SystemType

from homeassistant.config_entries import ConfigEntry
Expand All @@ -22,7 +27,7 @@
from homeassistant.exceptions import ConfigEntryAuthFailed
from homeassistant.helpers.debounce import Debouncer
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed

from .const import CONF_ALLOW_NOTIFY, CONF_SYSTEM, DOMAIN

Expand Down Expand Up @@ -187,3 +192,5 @@ async def _async_update_data(self):
pass
except AutenticationFailure as exception:
raise ConfigEntryAuthFailed(str(exception)) from exception
except GeneralFailure as exception:
raise UpdateFailed(str(exception)) from exception

0 comments on commit 651d413

Please sign in to comment.