Is your feature request related to a problem? Please describe.
Integrations using the econnect-python library, such as the Home Assistant integration (https://github.com/palazzem/ha-econnect-alarm), currently need to handle various exceptions raised by the library. This leads to duplicated code and inconsistent error handling across different integrations. It also increases the complexity of the client code that uses the library.
Describe the solution you'd like
Implement centralized error handling within the econnect-python library itself. This involves defining a custom exception class (e.g., ElmoClientError) to encapsulate all specific error conditions. All exceptions raised by the library should be logged internally, and meaningful error messages should be provided to the client.
Describe alternatives you've considered
Leaving error handling to the client applications, which results in duplicated code and inconsistent handling strategies.
Using multiple custom exceptions for different error types, which could still lead to complex handling in client applications.
Is your feature request related to a problem? Please describe. Integrations using the
econnect-python
library, such as the Home Assistant integration (https://github.com/palazzem/ha-econnect-alarm), currently need to handle various exceptions raised by the library. This leads to duplicated code and inconsistent error handling across different integrations. It also increases the complexity of the client code that uses the library.Describe the solution you'd like Implement centralized error handling within the
econnect-python
library itself. This involves defining a custom exception class (e.g.,ElmoClientError
) to encapsulate all specific error conditions. All exceptions raised by the library should be logged internally, and meaningful error messages should be provided to the client.Describe alternatives you've considered
Additional context n/a