mirror of
https://github.com/home-assistant/core.git
synced 2025-08-06 22:25:13 +02:00
Seperate timeout errors in rest requests (#78710)
This commit is contained in:
@@ -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(
|
||||||
|
Reference in New Issue
Block a user