You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(api): catalog the /meta unrecognised-type-spelling refusal (#9245)
The `metaUrlSpellingRefusal` envelope — `INVALID_REQUEST` / 400 / "not a
recognised spelling" — ships on the wire and was documented nowhere in
`content/docs/**`. A caller that hit it got a status and a code it could not
look up. Adds the catalog entry, plus a pointer from the Metadata API page.
Measured on origin/main rather than inherited: the refusal declines a
MISSPELLING of a declared type (`viewes` for `view`), not a plural —
recognised plurals fold to the canonical singular and are served. The entry
states no verb count, because a prose count is a declared-vs-enforced pair
with no enforcement.
Fixes#9193
Claude-Session: https://claude.ai/code/session_01Y26DJEHSBhhAQ6wwfsHNza
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: content/docs/api/error-catalog.mdx
+56Lines changed: 56 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -521,6 +521,62 @@ if (!res.success) showToast(res.error);
521
521
522
522
---
523
523
524
+
## Metadata API Errors (`/meta`)
525
+
526
+
`/meta` refusals carry codes registered to `@objectstack/metadata-protocol` in the
527
+
[error-code ledger](/docs/references/api/error-code-ledger), not the standard catalog
528
+
above — so their status is published here rather than inherited from a category. This
529
+
section documents the **type-spelling** refusal the `/meta` request boundary raises. It
530
+
is not a complete inventory of `/meta` errors.
531
+
532
+
### `INVALID_REQUEST` — unrecognised type spelling
533
+
534
+
**Cause:** The type segment of a `/meta` path is not a spelling ObjectStack recognises,
535
+
*and* it evidently reaches for a metadata type the platform itself declares — a
536
+
misspelling of a real type. `GET /meta/viewes` is refused because `viewes` is not a
537
+
recognised spelling of the declared type `view`.
538
+
539
+
**Fix:** Address the type by its canonical singular name, or by its canonical REST
540
+
plural. The refusal names both, so the correction never has to be guessed — for
541
+
`viewes` it names `view` and `views`. See the [Metadata API](/docs/api/metadata-api).
542
+
**Retry:**`no_retry` — the spelling is refused deterministically; retrying it
543
+
unchanged returns the same `400`.
544
+
545
+
`GET /api/v1/meta/viewes` answers `400` with:
546
+
547
+
```json
548
+
{
549
+
"success": false,
550
+
"error": {
551
+
"code": "INVALID_REQUEST",
552
+
"message": "[invalid_request] 'viewes' is not a recognised spelling of metadata type 'view'. Address it as 'view' or 'views'. Refused rather than treated as a plugin-registered type, because forwarding an unrecognised spelling of a declared type would create a second namespace under type='viewes'.",
553
+
"httpStatus": 400
554
+
}
555
+
}
556
+
```
557
+
558
+
<Callouttype="warn">
559
+
**This is not a refusal of plural type names.** Recognised plurals are *not* refused:
560
+
the boundary folds them to the canonical singular and serves the request — `views`
561
+
addresses `view`, `objects` addresses `object`. What this error refuses is a spelling
562
+
that resolves to no type at all while reaching for one the platform declares.
563
+
</Callout>
564
+
565
+
**Why it is refused rather than passed through.** A type segment the platform does not
566
+
recognise would otherwise be treated as a plugin-registered kind, and a write under it
567
+
would mint a second metadata namespace keyed by the misspelling — `type='viewes'`
568
+
alongside `type='view'` — which nothing reads and nothing serves. Refusing at the
569
+
boundary is what keeps one type to one key.
570
+
571
+
⛔ **Not this error:** a segment that reaches for no declared type — `/meta/fieldz`, or
572
+
a plugin-registered kind such as `theme` — is not a misspelling of anything the platform
573
+
declares, so this rule stays silent and the request continues down the plugin path. A
574
+
**write** whose segment is not a metadata type at all is refused separately: same
575
+
`INVALID_REQUEST` code and `400` status, different message (*"… is not a metadata
576
+
type"*). Tell the two apart by the message, not the code.
577
+
578
+
---
579
+
524
580
## Error Response Structure
525
581
526
582
Every error response follows the `EnhancedApiError` schema:
0 commit comments