Interface: SortDeleteRefusalDto
@kortexya/reasoninglayer / SortDeleteRefusalDto
Interface: SortDeleteRefusalDto
Section titled “Interface: SortDeleteRefusalDto”Defined in: src/types/sorts.ts:1509
The refusal a sort delete answers with.
Remarks
Section titled “Remarks”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?}, withstatusas the HTTP status.GET /api/v1/sorts/{id}/delete-previewreports it as SortDeletePreviewResponse.refusal, without deleting anything.- OSFQL
DROP SORTanswers it as thesort_delete_refusalof the error body, besideerror_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.
Properties
Section titled “Properties”code:
string
Defined in: src/types/sorts.ts:1513
The stable machine-readable discriminator. See the table above.
message
Section titled “message”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
Section titled “status”status:
number
Defined in: src/types/sorts.ts:1511
The HTTP status of the refusal.