Skip to content

Commit ba96749

Browse files
committed
docs: qualify the null-master 403 with the read door's 404, and make the optional-master table cell agree with its paragraph
A principal who cannot read a null-master row meets the by-id read door first and is answered 404 RECORD_NOT_FOUND, as for every hidden row; the 403 is for everyone else who reaches the gate. On the declaration table the optional-master row now says an insert that leaves the reference out is not refused, while an update that empties it is judged by the master it leaves (403 PERMISSION_DENIED without edit access); the catalog's prose says the same. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2ebbZkr2QAEG1x7UC8
1 parent f28b6db commit ba96749

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

‎content/docs/api/error-catalog.mdx‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,15 @@ An optional master never answers this code. When the object's only `master_detai
201201
declared `required: false` (an optional master, ADR-0055 §1 as amended), a stored empty
202202
reference is not an error: the row belongs to no master and is its owner's. Its owner and a
203203
holder of View All on the detail read it; its owner and a holder of Modify All on the detail
204-
update or delete it, and anyone else is refused `403 PERMISSION_DENIED`.
204+
update or delete it. Everyone else who reaches the gate, View All included, is refused
205+
`403 PERMISSION_DENIED`; a principal who cannot read the row meets the read door first
206+
(`404 RECORD_NOT_FOUND`), as for every hidden row.
205207

206208
A request that leaves the master reference out, or empties it, does not answer this code.
207209
On a `master_detail` that is `required: true` and neither `readonly` nor `system`, validation
208210
answers it with the documented `400 VALIDATION_FAILED` and `fields`. On an optional master
209-
nothing refuses it: an insert that names no master is admitted and its creator owns the row,
210-
and an update that empties the reference asks edit access on the master it leaves
211+
an insert that leaves it out is not refused, and its creator owns the row; an update that
212+
empties it is judged by the master it leaves, asking edit access on it
211213
(`403 PERMISSION_DENIED` without it). A master reference marked `readonly` or `system`,
212214
required or optional, is not one an author's write supplies, so it cannot be the master
213215
(ADR-0055 §1): `ObjectSchema` refuses that declaration at parse (`master-not-writable`), and

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -571,8 +571,10 @@ An **optional** master never answers this code. A `controlled_by_parent` object
571571
`master_detail` is declared `required: false` has an optional master (ADR-0055 §1 as
572572
amended), and a stored empty reference on it is not an error: the row belongs to no master
573573
and is its owner's. Its owner (`owner_id`) and a holder of View All on the detail read it;
574-
its owner and a holder of Modify All on the detail update or delete it, and anyone else —
575-
View All included — is refused `403 PERMISSION_DENIED`. A row with no owner, or on an
574+
its owner and a holder of Modify All on the detail update or delete it. Everyone else who
575+
reaches the gate, View All included, is refused `403 PERMISSION_DENIED`; a principal who
576+
cannot read the row meets the read door first (`404 RECORD_NOT_FOUND`), as for every hidden
577+
row. A row with no owner, or on an
576578
object that carries no `owner_id` column, is read through View All and written through
577579
Modify All alone.
578580
@@ -582,7 +584,7 @@ refuses first, and that depends on how the reference is declared:
582584
| Master reference declared as | Refused by | Status | `code` | `fields` |
583585
|---|---|:---:|---|:---:|
584586
| `master_detail` + `required: true`, not `readonly`/`system` | required-field validation | 400 | `VALIDATION_FAILED` | yes |
585-
| `master_detail` + `required: false` (the optional master), not `readonly`/`system` | not refused (see below) | — | — | — |
587+
| `master_detail` + `required: false` (the optional master), not `readonly`/`system` | an insert that leaves it out: not refused; an update that empties it: the master-access gate, by edit access on the master it leaves (see below) | — / **403** | — / `PERMISSION_DENIED` | — / absent |
586588
| `master_detail` (required or optional) + `readonly` | the master-access gate | **422** | `INVALID_METADATA` | **absent** |
587589
| `master_detail` (required or optional) + `system` | the master-access gate | **422** | `INVALID_METADATA` | **absent** |
588590

0 commit comments

Comments
 (0)