op: reject

Abort the intent with a typed error code.

Allowed phases

PhaseStatus
preflight✓ allowed
core✗ forbidden
side_effects✗ forbidden

Syntax

- op: reject
  code: TICKET_LIMIT_EXCEEDED
  message: "You can only purchase 4 tickets per show"

Parameters

FieldRequiredDescription
codeyesSCREAMING_SNAKE_CASE code returned to the client
messagenoHuman-readable rejection message

Behavior

  • Preflight only. When reject runs, core and side_effects never execute.
  • Compiler error VERR_PREFLIGHT_SIDE_EFFECT if reject appears outside preflight.

if · lookup

See also