mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Seperate timeout errors in rest requests (#78710)
This commit is contained in:
parent
8fd18cda30
commit
3655958d26
@ -69,6 +69,12 @@ class RestData:
|
|||||||
)
|
)
|
||||||
self.data = response.text
|
self.data = response.text
|
||||||
self.headers = response.headers
|
self.headers = response.headers
|
||||||
|
except httpx.TimeoutException as ex:
|
||||||
|
if log_errors:
|
||||||
|
_LOGGER.error("Timeout while fetching data: %s", self._resource)
|
||||||
|
self.last_exception = ex
|
||||||
|
self.data = None
|
||||||
|
self.headers = None
|
||||||
except httpx.RequestError as ex:
|
except httpx.RequestError as ex:
|
||||||
if log_errors:
|
if log_errors:
|
||||||
_LOGGER.error(
|
_LOGGER.error(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user