Repository navigation
Commit 38e3526
committed
refactor(rest,service-messaging,plugin-webhooks)!: sweep the last top-level codes and un-nest three flat envelopes (ADR-0112 batch 2)
- rest: OBJECT_NOT_FOUND, UNAUTHENTICATED (it sat in the same if/else as an
already-SCREAMING PERMISSION_DENIED), INVALID_REQUEST.
- service-messaging redeliver: RESOURCE_NOT_FOUND / DELIVERY_NOT_ELIGIBLE, with
the plugin-webhooks route that branches on them.
Three routes also had a bare code string in the `error:` slot with a real
`message:` beside it, so `error` was a code and the declared object envelope was
nowhere. They now emit `error: { code, message }` — a rename alone would have
left them unvalidated, which is how the lowercase dialect survived the first
place.
`mapDataError`'s downcasing is inverted, not just renamed. It deliberately
translated the internal SCREAMING OBJECT_NOT_FOUND down to `object_not_found` on
the way out, and a test pinned exactly that ("does not let the generic 4xx
passthrough ship the internal SCREAMING_CASE code") — correct when the data
routes were believed to speak their own dialect, backwards once there is one
vocabulary. The translation is gone and the test is rewritten to pin what still
matters: no per-route dialect translation, what the gate threw is what ships.
Two comments that still taught the lowercase wire code are updated with it.
Field-level codes in `import-coerce.ts` are deliberately untouched (ADR-0112 D6,
#3977).
Refs #4003, #3841.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MaSQn77TT5fUgHK9CesaDK1 parent c463493 commit 38e3526
19 files changed
Lines changed: 124 additions & 115 deletions
File tree
- content/docs/references/api
- packages
- metadata-protocol/src
- plugins/plugin-webhooks/src
- rest/src
- services/service-messaging/src
- spec/src/api
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| |||
241 | 242 | | |
242 | 243 | | |
243 | 244 | | |
| 245 | + | |
244 | 246 | | |
245 | 247 | | |
246 | 248 | | |
| |||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
0 commit comments