Skip to content

Type Alias: GovernanceRefusalCode

@kortexya/reasoninglayer


@kortexya/reasoninglayer / GovernanceRefusalCode

GovernanceRefusalCode = GeneratedGovernanceRefusalCode

Defined in: src/types/governance.ts:2905

The closed code of a governance refusal body (GovernanceRefusalResponse: { error, code, message }) that the M4 governance, platform, webhook, marketplace-review, rule-comparison and operational-write routes answer.

The engine publishes this set in its OpenAPI document; the type is the generated enum, so a regeneration carries every new member. A refusal body with one of these codes becomes a GovernanceRefusedError; a code of the vocabulary set becomes a VocabularyRefusedError.

try {
await client.governance.assignRole(request, key);
} catch (error) {
if (error instanceof GovernanceRefusedError && error.code === 'role_assignment_end_required') {
askForAnEndDate();
}
}