Skip to content

ConstraintFailure

Defined in: failure.ts:71

A constraint was violated.

  • BaseFailure

readonly constraint: string

Defined in: failure.ts:76

Description of the constraint (e.g., ‘gte(0)’, ‘maxLength(10)‘)


readonly kind: "constraint"

Defined in: failure.ts:72


readonly message: string

Defined in: failure.ts:32

Human-readable error message

BaseFailure.message


readonly node: NodeId

Defined in: failure.ts:30

The AST node where the failure occurred

BaseFailure.node


readonly path: JsonPath

Defined in: failure.ts:74

Path where the constraint failed


readonly value: unknown

Defined in: failure.ts:78

The value that failed the constraint