Skip to content

Commit 4f37912

Browse files
claude[bot]claude
andauthored
docs(protocol): give INVALID_FIELD one published meaning (#15883)
`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 '<field>' on object '<object>'`) with the `field`/`object` details that producer actually sets. Status stays 400, as every producer sets and `error-response.ts` maps. Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk Co-authored-by: Claude <noreply@anthropic.com>
1 parent 132742f commit 4f37912

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

content/docs/protocol/kernel/error-handling.mdx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,25 +301,30 @@ deriving it from this page.
301301

302302
#### `INVALID_FIELD`
303303
**HTTP Status:** 400
304-
**Meaning:** Field value has wrong type
304+
**Meaning:** A field name in the request does not exist on the target object — a name that
305+
resolves to nothing, not a value of the wrong type. On a list read it also covers an
306+
unreserved query parameter, which `GET /data/:object` reads as a field filter.
305307

306308
**Example:**
307309
```json
308310
{
309311
"success": false,
310312
"error": {
311313
"code": "INVALID_FIELD",
312-
"message": "Field 'age' must be a number",
314+
"message": "Unknown field 'age' on object 'contact'",
313315
"details": {
314316
"field": "age",
315-
"expected_type": "number",
316-
"actual_type": "string",
317-
"value": "twenty-five"
317+
"object": "contact"
318318
}
319319
}
320320
}
321321
```
322322

323+
The [error catalog's `INVALID_FIELD` entry](/docs/api/error-catalog#invalid_field) carries
324+
the authoritative cause text — it enumerates every read axis this one code answers on
325+
(`select`, `expand`, `searchFields`, `groupBy`, `aggregations[].field`) and the
326+
off-request `backfillSummaryNulls` case.
327+
323328
### Resource Errors
324329

325330
#### `RESOURCE_NOT_FOUND`

0 commit comments

Comments
 (0)