From d194ce00ab7feca53ebb4cd4dec5a2b25a94aea9 Mon Sep 17 00:00:00 2001 From: Arksine Date: Wed, 6 Jan 2021 19:42:40 -0500 Subject: [PATCH] update_manager: send notification response upon update error Attach "is_complete" to the response so clients know that the transaction is done, even though it resulted in an error. Signed-off-by: Eric Callahan --- moonraker/plugins/update_manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/moonraker/plugins/update_manager.py b/moonraker/plugins/update_manager.py index 1d49620..e70bafd 100644 --- a/moonraker/plugins/update_manager.py +++ b/moonraker/plugins/update_manager.py @@ -186,7 +186,9 @@ class UpdateManager: self.current_update = (app, id(web_request)) try: await updater.update(inc_deps) - except Exception: + except Exception as e: + self.notify_update_response(f"Error updating {app}") + self.notify_update_response(str(e), is_complete=True) raise finally: self.current_update = None