Function: isConstraintOverUnreadData()
@kortexya/reasoninglayer / isConstraintOverUnreadData
Function: isConstraintOverUnreadData()
Section titled “Function: isConstraintOverUnreadData()”isConstraintOverUnreadData(
error):error is ConstraintViolationError
Defined in: src/errors.ts:280
Whether error is the one bare refusal of a bound constraint over data the
caller may not read (reasoninglayer#1230, #1235).
Parameters
Section titled “Parameters”unknown
Anything caught from an SDK call.
Returns
Section titled “Returns”error is ConstraintViolationError
true when error is a ConstraintViolationError whose
code is constraint_over_unread_data; false otherwise, for any other
409 included.
Remarks
Section titled “Remarks”The REST write doors answer it as a 409: POST /api/v1/terms,
PUT /api/v1/terms/{id}, POST /api/v1/terms/bulk,
POST /api/v1/inference/facts and POST /api/v1/actions/apply (an edit
the action puts, and its conditional replacement). OSFQL answers the same
refusal as an OsfqlError instead; test that one with
isOsfqlConstraintOverUnreadData.
Example
Section titled “Example”try { await client.terms.updateTerm(termId, { features: { paid: 100 } });} catch (e) { if (isConstraintOverUnreadData(e)) askSomeoneWhoCanReadTheRecord();}