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:
Allen Porter 2023-10-05 22:38:15 -07:00 committed by GitHub
parent 1d31def982
commit c7d533d427
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 203 additions and 49 deletions

View 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."""