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 <arksine.code@gmail.com>
This commit is contained in:
Arksine 2021-01-06 19:42:40 -05:00
parent 5f986ab770
commit d194ce00ab
1 changed files with 3 additions and 1 deletions

View File

@ -186,7 +186,9 @@ class UpdateManager:
self.current_update = (app, id(web_request)) self.current_update = (app, id(web_request))
try: try:
await updater.update(inc_deps) 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 raise
finally: finally:
self.current_update = None self.current_update = None