Skip to content

Init-time fatal errors are not surfaced to the websocket #5782

Closed

Description

@aglinxinyuan

Problem

When workflow execution initialization fails, the error is recorded into the execution metadata store but is never delivered to connected frontend clients — the user sees no error in the UI even though the execution failed to start.

Root cause

WorkflowService.initExecutionService wraps execution construction + start in a try/catch. The catch arm only calls errorHandler(e), which records a WorkflowFatalError into the execution metadata store. It does not push anything to errorSubject, the workflow-level websocket channel that connect() subscribers listen on.

For failures during new WorkflowExecutionService(...) — i.e. before executionService.onNext(execution) publishes the execution — no subscriber is ever attached to that execution's metadata store, so the recorded error stays invisible to the UI (it is only logged server-side).

init fails -> errorHandler records fatal error in metadata store
           -> (no push to errorSubject)
           -> frontend connect() subscriber receives nothing   [X]

Expected

Init-time fatal errors should reach the frontend the same way other errors do:

init fails -> errorHandler records fatal error
           -> errorSubject.onNext(WorkflowErrorEvent(fatalErrors))
           -> frontend receives WorkflowErrorEvent             [OK]

Discovered while splitting #5700 (loop operators); the fix is independent of that feature.

Activity

  1. added theissue type on Jun 18, 2026
  2. github-actions commented on Jun 18, 2026

    @github-actions
    Contributor

    👋 Thanks for opening this issue, @aglinxinyuan!

    It looks like the issue description doesn't quite follow our template yet:

    • The What happened? section is missing; please keep the template's headings.
    • The How to reproduce? section is missing; please keep the template's headings.
    • The Version/Branch section is missing; please keep the template's headings.

    Filling out the template helps reviewers understand and triage your contribution faster. Please edit the description to complete it. This message will disappear automatically once the template is followed.

    You can find the template prompts by editing the description, or see CONTRIBUTING.md for the full contribution flow.

  3. added a commit that references this issue on Jun 24, 2026
    e0ee535
  4. added a commit that references this issue on Jun 24, 2026
    1c580e5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions