Primitive
logic.assert
BETAShort name: assert
Version: 1.0.0
Throw a typed error when condition is not strictly true.
Back to primitive libraryInputs
| Key | Type | Required | Description |
|---|---|---|---|
| code | string | false | Optional machine-readable error code. Defaults to ASSERTION_FAILED. |
| condition | boolean | true | Must be strictly true to pass. |
| message | string | true | Error message surfaced when condition is false. |
| statusCode | number | false | Optional HTTP-style status code. Defaults to 422 for assertion failures. |
Outputs
| Key | Type | Required | Description |
|---|---|---|---|
| ok | boolean | false | Always true when the step returns; false path throws instead. |