Skip to content

Type Alias: SortApprovalErrorCode

@kortexya/reasoninglayer


@kortexya/reasoninglayer / SortApprovalErrorCode

SortApprovalErrorCode = "separation_of_duties"

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

The code POST /api/v1/sorts/{id}/approve puts in its coded 403 body.

separation_of_duties: the acting user (X-Authenticated-User, the client’s authenticatedUser) is the sort’s recorded proposer, and whoever proposed a sort may not approve it. The engine enforces this itself, names the sort in the message, and records the refusal in the oversight ledger as a rejected decision on the action sort.approve.refused. Another steward can approve the same sort.

The body is { error, code, message } — read code with errorBodyCode. A 403 without a code is the gateway withholding Manage on the sort, which no other user fixes by retrying.

const code: SortApprovalErrorCode = 'separation_of_duties';