Skip to content

Type Alias: SortApprovalErrorCode

@kortexya/reasoninglayer


@kortexya/reasoninglayer / SortApprovalErrorCode

SortApprovalErrorCode = "separation_of_duties" | SortManageErrorCode

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

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

sort_manage_not_granted: the authorization context grants no Manage on the sort (see SortManageErrorCode). No other user fixes it by retrying; a steward with Manage can approve the sort.

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.

const code: SortApprovalErrorCode = 'separation_of_duties';