Exceptions¶
pybticino.exceptions.PyBticinoException ¶
Bases: Exception
Base exception for all errors raised by the pybticino library.
All other library-specific exceptions inherit from this class.
pybticino.exceptions.AuthError ¶
Bases: PyBticinoException
Raised when authentication with the BTicino/Netatmo API fails.
This can occur due to invalid credentials, network issues during the authentication process, or problems refreshing the access token.
pybticino.exceptions.ApiError ¶
Bases: PyBticinoException
Raised when a BTicino/Netatmo API call returns an error status.
Attributes:
| Name | Type | Description |
|---|---|---|
status_code |
int
|
The HTTP status code returned by the API. |
error_message |
str
|
The error message provided by the API or a description of the error. |
__init__ ¶
Initialize the API error.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
status_code
|
int
|
The HTTP status code from the API response. |
required |
error_message
|
str
|
The error message associated with the failure. |
required |