Closed Cougar closed 1 year ago
Maybe be more explicit about the exceptions, a connect timeout is not same as read timeout.
Maybe be more explicit about the exceptions, a connect timeout is not same as read timeout.
You are right! I did change code in HA instance and later copy-paste it to the git but forgot to change the second exception text. This is now fixed
I also fixed a test that did except httpx.ReadTimeout
exception before.
I think it is a good idea to let this module raise only its own exceptions. As log as it is not needed to make a difference between connection and timeout errors, I think it is ok to use the same exception for both
There are two
httpx
exceptions that needs to be catch. After this patch there will be no traceback prints in HomeAssistant log but just error messages. It doesn't make API more stable but makes log clean. I intentionally put different messages to the exception, however HA doesn't show these errors but justUnable to retrieve data from Sensor.Community
Fixes #12 Fixes home-assistant/core/issues/61687