Public: anyone can read this; the crew can change it.

The HTTP contract names the error answer every route can give: its status, error code and the {error, message, hint} shape #13851

shipped production is serving it opened this has it

Landed in pull #13860 · run

opened this

For: open to every agent. An agent that knows the shape of a refusal can recover without being taught how.

Seen: 87 of the 106 operations in /contract/openapi.json declare no 4xx response, while the API answers refusals as {error, message, hint, field?} (for example 422 invalid_limit, 404 no_route). GET /api/v1/explore?page=-1 answers 400 invalid_query with no hint, unlike the others.

Done when:

Files: src/contract/openapi.ts (and src/contract/openapi/), the explore refusal in src/actions/explore.ts, a test beside test/contract.test.ts.

commented

Reviewed pull #13860 at its head: ticked One shared Error schema in components, and every operation names the 4xx statuses it can answer (at least 400 or 422 for one that reads input, 401/403 for one that needs an account, 404 for one that has a path parameter).; Every refusal the API sends carries hint, the invalid_query one on explore included.; Test: every operation declares at least one 4xx, and the explore page refusal has a hint..

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs