Assert

Emit an error if the boolean expression evaluates to false.

2 min readNode

Overview

PropertyValue
Node IDcore/assert
Kindaction
Modulecore-flowdsl
Repogo-flowdsl
Handlergithub.com/redelay/go-flowdsl/nodes/core.Assert
Iconlucide:check-circle
Color#10b981
Tagsvalidation, 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

PropertyTypeRequiredDefaultUI GroupDescription
exprstringyes——Boolean expression (same language as core/if).
messagestring—assertion failed—

Example

yaml
# 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?