Skip to content

Return an error from Core.Case when no exit matches and there is no default exit - #346

Draft
joaothallis wants to merge 2 commits into
developfrom
fix/case-block-no-default-exit
Draft

Return an error from Core.Case when no exit matches and there is no default exit#346
joaothallis wants to merge 2 commits into
developfrom
fix/case-block-no-default-exit

Conversation

@joaothallis

@joaothallis joaothallis commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Purpose

A Core.Case block whose exit tests all evaluate to false and which has no default exit crashes the calling process with a MatchError, because Case.evaluate_outgoing/5 bang-matches Block.evaluate_exits/2. #258 made that situation a graceful {:error, "No default exit available"} everywhere except this path. The error now returns through Block.evaluate_outgoing/5 so callers can end the flow cleanly.

🤖 Generated with Claude Code

@joaothallis joaothallis self-assigned this Sep 10, 2026
… no default exit

FlowRunner.Spec.Blocks.Case.evaluate_outgoing/5 bang-matched
Block.evaluate_exits/2, so the {:error, "No default exit available"} that
#258 introduced as a graceful return raised a MatchError in the caller's
process instead. The error now returns through Block.evaluate_outgoing/5,
which already propagates the same error from fetch_next_block/3.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@joaothallis
joaothallis force-pushed the fix/case-block-no-default-exit branch from 69066c7 to 1adfaf1 Compare September 11, 2026 02:18
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant