Update fitbit error handling (#101304)
* Update fitbit error handling * Update exceptions to inherit HomeAssistantError and add reason code * Revert config flow exception mapping hack
This commit is contained in:
parent
1d31def982
commit
c7d533d427
8 changed files with 203 additions and 49 deletions
14
homeassistant/components/fitbit/exceptions.py
Normal file
14
homeassistant/components/fitbit/exceptions.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
"""Exceptions for fitbit API calls.
|
||||
|
||||
These exceptions exist to provide common exceptions for the async and sync client libraries.
|
||||
"""
|
||||
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
|
||||
|
||||
class FitbitApiException(HomeAssistantError):
|
||||
"""Error talking to the fitbit API."""
|
||||
|
||||
|
||||
class FitbitAuthException(FitbitApiException):
|
||||
"""Authentication related error talking to the fitbit API."""
|
Loading…
Add table
Add a link
Reference in a new issue