Type Alias: SortCreateErrorCode
@kortexya/reasoninglayer / SortCreateErrorCode
Type Alias: SortCreateErrorCode
Section titled “Type Alias: SortCreateErrorCode”SortCreateErrorCode =
"sort_id_unavailable"|"sort_id_held_under_another_name"|"governed_sort_write_refused"
Defined in: src/types/sorts.ts:2051
The code of a 409 that POST /api/v1/sorts answers for a caller-chosen
CreateSortRequest.id.
Remarks
Section titled “Remarks”Read it with errorBodyCode(error) from a ConstraintViolationError.
sort_id_unavailable— the id is held outside the caller’s scope (by another tenant’s sort, or a shared-lattice id posted under a different name), or it is a name-based (version 5) UUID that names none of the caller’s own sorts. The message names only the id. Omitidto let the engine mint one. Every route that registers a sort answers this code.sort_id_held_under_another_name— the id names one of the caller’s own sorts, and the request carries a differentname. A re-post of an own id keeps the held name, so rename withPATCH /api/v1/sorts/{id}.governed_sort_write_refused— the id names one of the caller’s own sorts that declares@governed, and the re-post omits thegovernedannotation, which would withdraw the fence. The same code refuses aPATCHthat withdraws the annotation, a parent move that leaves a sort governed through an ancestor without a governed parent, and aterms=deletesort delete over terms of a governed sort.
Example
Section titled “Example”const code: SortCreateErrorCode = 'sort_id_unavailable';