Skip to content

Return an error from DynamicSelectOneResponse when its options are not [value, label] pairs - #349

Merged
joaothallis merged 1 commit into
developfrom
prod-7209-journeys-crash-when-the-options-for-a-dynamic-list-or
Oct 13, 2026
Merged

joaothallis merged 1 commit into
developfrom
prod-7209-journeys-crash-when-the-options-for-a-dynamic-list-or

Conversation

@joaothallis

Copy link
Copy Markdown
Contributor

Purpose

DynamicSelectOneResponse assumes every option its choice_expression returns is a [value, label] pair. When the list the options are built from is missing, Expression returns its error map instead, and the block raises a FunctionClauseError in the caller's process.

Approach

evaluate_incoming/4 now returns {:error, reason} when the options are not a list of [value, label] pairs, which the FlowRunner.Spec.Block callback already allows.

🤖 Generated with Claude Code

…t [value, label] pairs

DynamicSelectOneResponse.update_config/4 mapped over the evaluated
choice_expression assuming every element is a [value, label] pair. When the
list the options are built from is missing, Expression returns its error map
instead, and the block raised a FunctionClauseError in the caller's process.
It now returns {:error, reason} from evaluate_incoming/4, which the
FlowRunner.Spec.Block callback already allows.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@joaothallis joaothallis self-assigned this Oct 13, 2026
@joaothallis
joaothallis marked this pull request as ready for review October 13, 2026 20:27

@smn smn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@joaothallis
joaothallis merged commit 88c1881 into develop Oct 13, 2026
2 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants