Skip to content

Commit 38e3526

Browse files
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_01MaSQn77TT5fUgHK9CesaDK
1 parent c463493 commit 38e3526

19 files changed

Lines changed: 124 additions & 115 deletions

File tree

‎content/docs/references/api/analytics.mdx‎

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

‎content/docs/references/api/auth.mdx‎

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

‎content/docs/references/api/automation-api.mdx‎

Lines changed: 9 additions & 9 deletions
Large diffs are not rendered by default.

‎content/docs/references/api/batch.mdx‎

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

‎content/docs/references/api/contract.mdx‎

Lines changed: 8 additions & 8 deletions
Large diffs are not rendered by default.

‎content/docs/references/api/error-code-ledger.mdx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ const result = ErrorCode.parse(data);
156156
* `DATASET_INVALID`
157157
* `DATASOURCE_ADMIN_ERROR`
158158
* `DELEGABLE_SCOPE_FAILED`
159+
* `DELIVERY_NOT_ELIGIBLE`
159160
* `DESTRUCTIVE_CHANGE`
160161
* `DEVICE_CODE_FAILED`
161162
* `DOMAIN_VERIFICATION_DISABLED`
@@ -241,6 +242,7 @@ const result = ErrorCode.parse(data);
241242
* `OAUTH_REGISTER_FAILED`
242243
* `OBJECT_API_DISABLED`
243244
* `OBJECT_API_METHOD_NOT_ALLOWED`
245+
* `OPENAPI_UNAVAILABLE`
244246
* `OS_PROTOCOL_INCOMPATIBLE`
245247
* `OVERLAY_PERSISTENCE_FAILED`
246248
* `PACKAGE_DELETE_FAILED`

‎content/docs/references/api/export.mdx‎

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.

‎content/docs/references/api/metadata.mdx‎

Lines changed: 19 additions & 19 deletions
Large diffs are not rendered by default.

‎content/docs/references/api/package-api.mdx‎

Lines changed: 8 additions & 8 deletions
Large diffs are not rendered by default.

‎content/docs/references/api/protocol.mdx‎

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)