Yicong-Huang commented on code in PR #5781:
URL: https://github.com/apache/texera/pull/5781#discussion_r3464001549


##########
amber/src/main/scala/org/apache/texera/web/service/WorkflowService.scala:
##########
@@ -292,11 +292,23 @@ class WorkflowService(
       executionService.onNext(execution)
       execution.executeWorkflow()
     } catch {
-      case e: Throwable => errorHandler(e)
+      case e: Throwable =>
+        errorHandler(e)
+        reportFatalErrorsToSubscribers(executionStateStore)

Review Comment:
   Another design, for your consideration:
   1. make sure ExecutionService's construction is error free, and registers 
the error reporting logic as the first action. 
   2. Make executionService a separate `init` logic after being constructed. if 
any error happens during `init`, then it can be reported by the reporting logic 
wired during construction. 
   
   This design makes reporting logic a single place, and bundled with 
ExecutionService. The only challenge is to make sure construction is error free 
(so no external call, etc). 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to