From d56fb5deccb20eb991c94fdaab11f1745f199bdc Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 5 Sep 2026 12:07:53 +0000 Subject: [PATCH] docs(protocol): give `INVALID_FIELD` one published meaning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `error-handling.mdx` published «Field value has wrong type» with the example message `Field 'age' must be a number`, while `error-catalog.mdx` publishes the name/resolution meaning. A repo-wide producer sweep finds 22 assignment sites in 5 files, all name/resolution-shaped, and none of the 14 type-shaped refusal texts carries `INVALID_FIELD` — so the type meaning had no emitter and the example message quoted no producer. Rewrite only the `#### INVALID_FIELD` block: the Meaning now matches the catalog, and the example message is the real producer text from `packages/rest/src/error-response.ts:1655` (`Unknown field '' on object ''`) with the `field`/`object` details that producer actually sets. Status stays 400, as every producer sets and `error-response.ts` maps. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk --- content/docs/protocol/kernel/error-handling.mdx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/content/docs/protocol/kernel/error-handling.mdx b/content/docs/protocol/kernel/error-handling.mdx index d047175ce7..ff11cfd183 100644 --- a/content/docs/protocol/kernel/error-handling.mdx +++ b/content/docs/protocol/kernel/error-handling.mdx @@ -301,7 +301,9 @@ deriving it from this page. #### `INVALID_FIELD` **HTTP Status:** 400 -**Meaning:** Field value has wrong type +**Meaning:** A field name in the request does not exist on the target object — a name that +resolves to nothing, not a value of the wrong type. On a list read it also covers an +unreserved query parameter, which `GET /data/:object` reads as a field filter. **Example:** ```json @@ -309,17 +311,20 @@ deriving it from this page. "success": false, "error": { "code": "INVALID_FIELD", - "message": "Field 'age' must be a number", + "message": "Unknown field 'age' on object 'contact'", "details": { "field": "age", - "expected_type": "number", - "actual_type": "string", - "value": "twenty-five" + "object": "contact" } } } ``` +The [error catalog's `INVALID_FIELD` entry](/docs/api/error-catalog#invalid_field) carries +the authoritative cause text — it enumerates every read axis this one code answers on +(`select`, `expand`, `searchFields`, `groupBy`, `aggregations[].field`) and the +off-request `backfillSummaryNulls` case. + ### Resource Errors #### `RESOURCE_NOT_FOUND`