Skip to main content

Module errors

Module errors 

Source
Expand description

Composition load errors (SPEC §5, §7; unresolved_behavior).

Composition is a pre-processing pass that runs BEFORE validation/render: the parser expands $ref/$patch into a single spec first (G5). An unresolved composition is NOT a validation failure (valid:false) — it is a LOAD FAILURE: the spec itself does not come into existence. Never let an unresolved $ref pass as valid:true.

Load-error classes: (1) $ref file missing (2) $ref format error (3) detectKey absent (4) $ref cycle (A→B→A) (5) $patch target/op error

Structs§

ComposeLoadError
A composition load failure — distinct from a later validation error. Mirrors the JS ComposeLoadError (code + message + trace path stack for cycles).

Enums§

ComposeErrorCode
Machine-readable load-error codes. One per unresolved-behavior class — these strings are the cross-language contract (expectError.code in cases.json).

Type Aliases§

ComposeResult
Convenience alias for composition results.