Commit 5b76c2b
committed
docs(client-sdk): state the two-tier error-code vocabulary and add the VALIDATION_FAILED row
The `### Error Codes` table listed nine codes, all members of the closed
`StandardErrorCode` enum, with no statement of what it enumerates. It omitted
`VALIDATION_FAILED` — the ledger-registered code both of the page's own
error-handling examples branch on — so a reader working from the table
concludes a per-field validation failure arrives as `VALIDATION_ERROR` and
writes a branch that never matches.
Measured first, because adding the row to a table of enum members would have
made the table false: the table is 9 of the enum's 50 members, so it was never
"the enum" — it is a curated subset with an unstated contract. The fix is
therefore the contract plus the row, not the row alone.
- State the two-tier vocabulary (ADR-0112): the closed `StandardErrorCode`
catalog plus the per-package `ERROR_CODE_LEDGER`, with the exported
`ErrorCode` schema as their union and `packages/spec` as the authority.
- Add a `Tier` column so each row says which set it comes from, and add the
`VALIDATION_FAILED` row (ledger, 400).
- Sharpen `VALIDATION_ERROR`'s description to the distinction that actually
holds on the wire: request-shape refusals (repeated query parameter,
disallowed filter, malformed argument) versus record-level validation, which
answers `VALIDATION_FAILED` and carries `fields[]`.
- Note that `Category`/`Retryable` are semantic classification, not wire
guarantees — `packages/rest` sets neither on the per-field envelope.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UjM2ia8Av1v5NqfqQEQmC61 parent 68c5dba commit 5b76c2b
1 file changed
Lines changed: 35 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
680 | 704 | | |
681 | 705 | | |
682 | 706 | | |
| |||
0 commit comments