mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-27 11:06:32 +00:00
Improve error reporting
This commit is contained in:
parent
5cab5f0c08
commit
a203ed9cc5
@ -558,7 +558,7 @@ class Addon(AddonModel):
|
|||||||
await self.instance.run()
|
await self.instance.run()
|
||||||
except DockerAPIError as err:
|
except DockerAPIError as err:
|
||||||
self.state = AddonState.ERROR
|
self.state = AddonState.ERROR
|
||||||
raise AddonsError(err) from None
|
raise AddonsError(err) from err
|
||||||
else:
|
else:
|
||||||
self.state = AddonState.STARTED
|
self.state = AddonState.STARTED
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ class DockerAPI:
|
|||||||
container.start()
|
container.start()
|
||||||
except (docker.errors.DockerException, requests.RequestException) as err:
|
except (docker.errors.DockerException, requests.RequestException) as err:
|
||||||
_LOGGER.error("Can't start %s: %s", name, err)
|
_LOGGER.error("Can't start %s: %s", name, err)
|
||||||
raise DockerAPIError(err) from None
|
raise DockerAPIError(err) from err
|
||||||
|
|
||||||
# Update metadata
|
# Update metadata
|
||||||
with suppress(docker.errors.DockerException, requests.RequestException):
|
with suppress(docker.errors.DockerException, requests.RequestException):
|
||||||
|
@ -308,7 +308,7 @@ class Tasks(CoreSysAttributes):
|
|||||||
try:
|
try:
|
||||||
await addon.start()
|
await addon.start()
|
||||||
except AddonsError as err:
|
except AddonsError as err:
|
||||||
_LOGGER.error("Watchdog %s reanimation failed!", addon.slug)
|
_LOGGER.error("Watchdog %s reanimation failed with %s", addon.slug, err)
|
||||||
self.sys_capture_exception(err)
|
self.sys_capture_exception(err)
|
||||||
|
|
||||||
async def _watchdog_addon_application(self):
|
async def _watchdog_addon_application(self):
|
||||||
@ -338,7 +338,7 @@ class Tasks(CoreSysAttributes):
|
|||||||
try:
|
try:
|
||||||
await addon.restart()
|
await addon.restart()
|
||||||
except AddonsError as err:
|
except AddonsError as err:
|
||||||
_LOGGER.error("Watchdog %s reanimation failed!", addon.slug)
|
_LOGGER.error("Watchdog %s reanimation failed with %s", addon.slug, err)
|
||||||
self.sys_capture_exception(err)
|
self.sys_capture_exception(err)
|
||||||
finally:
|
finally:
|
||||||
self._cache[addon.slug] = 0
|
self._cache[addon.slug] = 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user