mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-19 15:16:33 +00:00
Stop reading advanced logs on ConnectionError (#5900)
* Stop reading advanced logs on ConnectionError If the client side connection closes with a `ConnectionError`, stop reading the advanced logs. This is very similar to ClientConnectionResetError which is easily reproducable by having a log open and following in the browser and then restaring Home Assistant. So far I wans't able to artificaially reproduce the ConnectionError, but there are quite some reports on Sentry so it seems to happen in real world. * Warn on ConnectionError
This commit is contained in:
parent
3b575eedba
commit
4f35759fe3
@ -269,6 +269,13 @@ class APIHost(CoreSysAttributes):
|
|||||||
err,
|
err,
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
|
except ConnectionError as err:
|
||||||
|
_LOGGER.warning(
|
||||||
|
"%s raised when returning journal logs: %s",
|
||||||
|
type(err).__name__,
|
||||||
|
err,
|
||||||
|
)
|
||||||
|
break
|
||||||
except (ConnectionResetError, ClientPayloadError) as ex:
|
except (ConnectionResetError, ClientPayloadError) as ex:
|
||||||
# ClientPayloadError is most likely caused by the closing the connection
|
# ClientPayloadError is most likely caused by the closing the connection
|
||||||
raise APIError(
|
raise APIError(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user