Type Alias: SortManageErrorCode
@kortexya/reasoninglayer / SortManageErrorCode
Type Alias: SortManageErrorCode
Section titled “Type Alias: SortManageErrorCode”SortManageErrorCode =
"sort_manage_not_granted"
Defined in: src/types/sorts.ts:2457
The code every ontology-governance door answers when the authorization
context grants no Manage on a sort it would define, change or move
(reasoninglayer#1231).
Remarks
Section titled “Remarks”One mapping answers it everywhere, as 403 with a
GovernanceRefusalResponse body { error, code, message }:
- every REST door that defines or changes a sort (reasoninglayer#1233):
sorts.createSort,bulkCreateSorts,declareDisjunction,declareIndividual,patchSort,patchSortFeature,removeSortFeature, andPOST /api/v1/sorts/proposals/generate; a re-post or a batch entry that changes nothing needs no Manage, and a refused batch writes no sort and binds no prefix; - the sort lifecycle routes:
sorts.approveSort,proposeDefinition,rejectDefinition,deprecateSort,editSortParents,reparentSort,updateReviewStatus, and the bound completioncompleteMeet(an operand withoutManage); scenarios.materializeScenario, for a sort the scenario creates or extends;- numeric-source registration, the source profiling routes and the template review routes;
- OSFQL: a
DEFINEor a change of a sort is anexecutionfailure (422) and anALTER SORTmove isrefused(403), both withOsfqlRefusal.codewrite_refusedandOsfqlRefusal.denialCodesort_manage_not_granted; the property-graph routes answer it inerror_type.
Nothing is written. The sort routes throw a ForbiddenError: read the code
with errorBodyCode(error). It is also a Governance.GovernanceRefusalCode.
Example
Section titled “Example”try { await client.sorts.deprecateSort(sortId, { reason: 'Duplicate' });} catch (error) { if (errorBodyCode(error) === 'sort_manage_not_granted') askAStewardToDeprecate(sortId);}