Skip to content

Interface: SortDeleteRefusalDto

@kortexya/reasoninglayer


@kortexya/reasoninglayer / SortDeleteRefusalDto

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

The refusal a sort delete answers with.

The same value on every surface that deletes a sort:

  • DELETE /api/v1/sorts/{id} answers it as the error body {error, code, message, sort_id, rules?}, with status as the HTTP status.
  • GET /api/v1/sorts/{id}/delete-preview reports it as SortDeletePreviewResponse.refusal, without deleting anything.
  • OSFQL DROP SORT answers it as the sort_delete_refusal of the error body, beside error_type: "refused".

sortDeleteRefusalOf reads it from the error of the first and the third.

code is the contract; the prose of message is not. The codes:

status code cause
400 sort_holds_terms the sort holds data terms under terms: 'refuse'
400 sort_term_cascade_too_large the term cascade is over what one request removes
400 sort_shared the sort is in the shared lattice
400 sort_authorization_schema the sort is part of the authorization schema
400 sort_would_orphan_children a child sort would be left with no parent
400 sort_subtree_too_large the subtree has more than 1 000 sorts
409 sort_named_by_rules a rule names the sort, or a rule pattern references a data term the cascade would remove
409 sort_terms_referenced a term outside the delete references a term the cascade would remove
409 sort_subtree_delete_interrupted a concurrent lattice change stopped a subtree delete part-way; the message names the sorts it removed

The engine can add a code, so code is a string.

code: string

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

The stable machine-readable discriminator. See the table above.


message: string

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

The refusal in words.


rules: SortReferencingRuleDto[]

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

The rules the refusal names. Empty unless the refusal is about rules.


status: number

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

The HTTP status of the refusal.