Assert
Emit an error if the boolean expression evaluates to false.
2 min readNode
Overview
| Property | Value |
|---|---|
| Node ID | core/assert |
| Kind | action |
| Module | core-flowdsl |
| Repo | go-flowdsl |
| Handler | github.com/redelay/go-flowdsl/nodes/core.Assert |
| Icon | lucide:check-circle |
| Color | #10b981 |
| Tags | validation, assert |
Description
Fails the RUN when expr is false (the handler returns an error with
message). Use it for invariants — states that should be impossible — not
for validating caller input.
Behind redelay/http-endpoint a failed run answers 500{"error":"Internal Server Error","message":"flow execution failed"}; the
message is visible only in the flowexec run log, never to the caller. For
a rejection the caller must see (400/403/422 with a code), branch with
core/if or core/json-schema-validate to a terminal that sets status_code
and your own fields instead.
Outputs
out— (no description)
Settings
| Property | Type | Required | Default | UI Group | Description |
|---|---|---|---|---|---|
expr | string | yes | — | — | Boolean expression (same language as core/if). |
message | string | — | assertion failed | — |
Example
# Use this node in a flow:
nodes:
- id: my_step
name: My Step
kind: action
action_ref: core/assert
config:
expr: "value"
message: assertion failed
Was this page helpful?