Skip to content

Type Alias: SortBoundConstraintErrorCode

@kortexya/reasoninglayer


@kortexya/reasoninglayer / SortBoundConstraintErrorCode

SortBoundConstraintErrorCode = "bound_target_not_local" | "bound_source_path_malformed" | "bound_feature_undeclared"

Defined in: src/types/sorts.ts:2529

The code of a 422 that refuses a boundConstraints entry of sorts.createSort (POST /api/v1/sorts). Read it with errorBodyCode.

  • bound_target_not_local — target is not one local feature (reasoninglayer#1246). A . makes it a path, unless the sort declares or inherits a feature of exactly that name. An empty target names no feature. OSFQL CHECK ON gives the same reason.
  • bound_source_path_malformed — sourcePath is empty or has an empty segment (reasoninglayer#1247).
  • bound_feature_undeclared — target, or the first segment of sourcePath, names no feature the sort declares or inherits, and the name is all digits (a bound constraint holds no constant: bound the feature with @range(min, max) on its declaration) or the sort the registration leaves is closed-world (reasoninglayer#1265). A constraint the sort already stores is not judged again. OSFQL CHECK ON answers the same code; on an open sort it admits another undeclared name and reports a warning in diagnostics.

Nothing is written for either. An unknown constraintType or onViolation value is refused before this check, with a plain-text 422 that carries no code.

const code: SortBoundConstraintErrorCode = 'bound_target_not_local';