Skip to content

Commit fbc46d6

Browse files
committed
docs: the unique refusal's example names the object by label
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X8RKtAGLpTgi5BmpDr2xeo
1 parent debb949 commit fbc46d6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎content/docs/protocol/kernel/error-handling.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ class — keeps its own code.
265265
(on `DELETE_RESTRICTED`, `CONCURRENT_UPDATE` and `VALIDATION_FAILED`). The `message` is the
266266
thrown one and can differ from the flat door's `error`: an unregistered object reads
267267
`Object 'ghost' not found` here and `Object 'ghost' is not registered` there, and a repeated
268-
unique value reads the engine's `Duplicate record refused on 'account': …` here, the same
268+
unique value reads the engine's `Duplicate record refused on 'Account': …` (the object's label) here, the same
269269
sentence `details.developerMessage` carries, where the flat door's `error` reads
270270
`A record with this email already exists`.
271271

‎docs/qa/platform-checklist/areas/records-forms.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4233,7 +4233,7 @@
42334233
],
42344234
"acceptance": [
42354235
{
4236-
"clause": "a colliding create is REFUSED, not landed: status 409, code UNIQUE_VIOLATION (ADR-0112 envelope), whose developerMessage NAMES THE OBJECT ('Duplicate record refused on 'qa_unique': …') and states 'No record was written.', while the user-facing `error` stays generic ('A record with this value already exists'); NEITHER carries a driver prefix, a driver statement or bound values — and the row count is unchanged. On the live SQLite leg the field is named only when the driver reports a single offending column (a tenant-scoped unique index is composite, so the sentence reads 'a unique constraint already holds these values'); the `object.field` wording is the memory driver's and stays a memory-pin assertion",
4236+
"clause": "a colliding create is REFUSED, not landed: status 409, code UNIQUE_VIOLATION (ADR-0112 envelope), whose developerMessage NAMES THE OBJECT by its declared label ('Duplicate record refused on 'LABEL': …'), by its API name ('qa_unique') only where the object declares no label, and states 'No record was written.', while the user-facing `error` stays generic ('A record with this value already exists'); NEITHER carries a driver prefix, a driver statement or bound values — and the row count is unchanged. On the live SQLite leg the field is named only when the driver reports a single offending column (a tenant-scoped unique index is composite, so the sentence reads 'a unique constraint already holds these values'); the `object.field` wording is the memory driver's and stays a memory-pin assertion",
42374237
"oracle": "api",
42384238
"verify": "the refusal body — status, code, and the developerMessage naming the object, read from developerMessage, not from the generic `error` — + a post-refusal count; the SQL-family envelope is single-sourced at packages/objectql/src/duplicate-record-error.ts (buildDuplicateMessage / envelopeUniqueViolation); the memory driver's `object.field` sentence (memory-unique-constraint.ts uniqueViolationError) is asserted by memory-unique-constraint.test.ts, not live",
42394239
"evidence": "refusal response + before/after counts"

0 commit comments

Comments
 (0)