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
Draft
Return an error from Core.Case when no exit matches and there is no default exit#346joaothallis wants to merge 2 commits into
joaothallis wants to merge 2 commits into
Conversation
… 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
force-pushed
the
fix/case-block-no-default-exit
branch
from
September 11, 2026 02:18
69066c7 to
1adfaf1
Compare
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
A
Core.Caseblock whose exit tests all evaluate to false and which has no default exit crashes the calling process with aMatchError, becauseCase.evaluate_outgoing/5bang-matchesBlock.evaluate_exits/2. #258 made that situation a graceful{:error, "No default exit available"}everywhere except this path. The error now returns throughBlock.evaluate_outgoing/5so callers can end the flow cleanly.🤖 Generated with Claude Code