mirror of
https://github.com/home-assistant/core.git
synced 2025-04-27 10:47:51 +00:00
generic camera: improved exception handling (#6158)
Avoid unhandled exception and stack trace when server closes connection by changing from handle ClientDisconnectedError to DisconnectedError. Also added HttpProcessingError, which was missing.
This commit is contained in:
parent
896e0476ff
commit
3b693d5e70
@ -118,7 +118,8 @@ class GenericCamera(Camera):
|
|||||||
_LOGGER.error('Timeout getting camera image')
|
_LOGGER.error('Timeout getting camera image')
|
||||||
return self._last_image
|
return self._last_image
|
||||||
except (aiohttp.errors.ClientError,
|
except (aiohttp.errors.ClientError,
|
||||||
aiohttp.errors.ClientDisconnectedError) as err:
|
aiohttp.errors.DisconnectedError,
|
||||||
|
aiohttp.errors.HttpProcessingError) as err:
|
||||||
_LOGGER.error('Error getting new camera image: %s', err)
|
_LOGGER.error('Error getting new camera image: %s', err)
|
||||||
return self._last_image
|
return self._last_image
|
||||||
finally:
|
finally:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user