Skip to content

Empty custom error handlers inside branch bodies can round-trip as return #495

Description

@hjotha

Problem

Empty custom error handlers inside structured branch bodies should rejoin the next safe statement in that branch. The top-level flow builder already routes these pending handlers when connecting one statement to the next, but branch builders can connect sequential statements directly.

That means a branch-local empty handler can stay pending until the branch terminates. A describe/exec/describe cycle may then show the empty handler as an explicit return; block instead of the authored empty block.

Expected behavior

For authored MDL like:

if $ShouldRefresh then
  call microflow Synthetic.RefreshCache() on error without rollback { };
  $ProcessedCount = call java action Synthetic.CountProcessedItems();
else
  return;
end if;

the empty handler should rejoin the Java action inside the branch and continue to describe as an empty handler.

Proposed fix

Run the same pending empty-handler rejoin step when IF and enum-split branch builders connect sequential branch statements. Keep output-dependent handlers on the existing skip-var path so they still avoid unsafe success tails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions