|
| 1 | +--- |
| 2 | +"@objectstack/spec": minor |
| 3 | +"@objectstack/rest": minor |
| 4 | +"@objectstack/runtime": minor |
| 5 | +"@objectstack/cloud-connection": minor |
| 6 | +"@objectstack/plugin-auth": minor |
| 7 | +"@objectstack/plugin-webhooks": minor |
| 8 | +"@objectstack/service-messaging": minor |
| 9 | +"@objectstack/service-automation": minor |
| 10 | +"@objectstack/metadata-protocol": minor |
| 11 | +"@objectstack/metadata-core": minor |
| 12 | +"@objectstack/hono": minor |
| 13 | +--- |
| 14 | + |
| 15 | +refactor!: ADR-0112 batch 2 — sweep the lowercase error-code emitters (#4003) |
| 16 | + |
| 17 | +Continues #3841 per ADR-0112. Batch 1 (#3988) settled the vocabulary and closed |
| 18 | +the set; this batch moves the emitters that still spoke lowercase `snake_case` |
| 19 | +onto it. |
| 20 | + |
| 21 | +**Wire-visible change.** Error codes on these surfaces change spelling. Generic |
| 22 | +conditions collapse onto the standard catalog rather than keeping a synonym: |
| 23 | +`unauthorized`/`unauthenticated` → `UNAUTHENTICATED`, `forbidden` → |
| 24 | +`PERMISSION_DENIED`, `not_found` → `RESOURCE_NOT_FOUND`, `internal` → |
| 25 | +`INTERNAL_ERROR`, `unavailable` → `SERVICE_UNAVAILABLE`, `not_supported` → |
| 26 | +`NOT_IMPLEMENTED`, `bad_request` → `INVALID_REQUEST`. Domain conditions get |
| 27 | +codes registered in `ERROR_CODE_LEDGER` (`MARKETPLACE_STORAGE_FAILED`, |
| 28 | +`PLUGIN_MANIFEST_INVALID`, `ITEM_LOCKED`, `DELIVERY_NOT_ELIGIBLE`, …). Swept: |
| 29 | +`cloud-connection`, `plugin-auth`, `hono`, `metadata-protocol`, `rest`, |
| 30 | +`service-messaging`, `service-automation`. |
| 31 | + |
| 32 | +**Three routes stop putting a code in the message slot.** The webhook redeliver |
| 33 | +route and two `rest` routes answered `{ success: false, error: '<code>', |
| 34 | +message }` — the code occupying `error`, the declared object envelope nowhere. |
| 35 | +They now emit `error: { code, message }`. Clients reading `body.error` as a |
| 36 | +string on these routes must read `body.error.code`. |
| 37 | + |
| 38 | +**`ConnectorErrorCategory` / `ConnectorRetryStrategy`** (ADR-0112 D9a): |
| 39 | +`@objectstack/spec` exported two mutually incompatible `ErrorCategory` types and |
| 40 | +two `RetryStrategy` types. The connector-side pair is renamed; importers of the |
| 41 | +`integration` subpath update the name. Side effect: the api-side `ErrorCategory` |
| 42 | +and `RetryStrategy` now appear in the generated API reference at all — the |
| 43 | +name collision had been silently dropping them. |
| 44 | + |
| 45 | +**Not swept, deliberately.** `sys_metadata_audit.code` keeps its lowercase |
| 46 | +values (ADR-0112 D6b): it is persisted audit history, and the same column holds |
| 47 | +non-error outcomes (`ok`, `lock_override`). Field-level codes stay as they are |
| 48 | +(D6, #3977). |
0 commit comments