Skip to content

Stop mandating an error format; mandate the error conditions - #7

Merged
christosgkoros merged 1 commit into
mainfrom
spec/error-format-not-mandated
Sep 9, 2026
Merged

christosgkoros merged 1 commit into
mainfrom
spec/error-format-not-mandated

Conversation

@christosgkoros

Copy link
Copy Markdown
Collaborator

SPEC §8 required RFC 9457 Problem Details with media type application/problem+json. That is a wire-format requirement on an API's whole error surface, imposed by a predicate grammar that has no business there: an API with an established error envelope had to carry a second one for a single endpoint.

What a client actually branches on is which of the five conditions failed — malformed-query, unknown-field, unsupported-operator, invalid-operand, query-too-complex — so that, plus 400 Bad Request, is what §8 now requires. RFC 9457 stays as the RECOMMENDED default where an API has no format of its own, and the type URIs, pointer and the recovery members are unchanged as its encoding. Both worked examples still use it.

This relaxes a requirement, so nothing that conformed before stops conforming. The schema is untouched and its $id still names v0.4.0.

The rest of the repo follows: README §Errors and COMPARISON §4 no longer claim Problem Details is the format, the OpenAPI examples say in a comment that the shape they model is the recommended one rather than the required one, and prose that said "problem" now names the condition.

SPEC §8 required RFC 9457 Problem Details with media type
application/problem+json. That is a wire-format requirement on an API's
whole error surface, imposed by a predicate grammar that has no business
there: an API with an established error envelope had to carry a second
one for a single endpoint.

What a client actually branches on is *which* of the five conditions
failed — malformed-query, unknown-field, unsupported-operator,
invalid-operand, query-too-complex — so that, plus 400 Bad Request, is
what §8 now requires. RFC 9457 stays as the RECOMMENDED default where an
API has no format of its own, and the type URIs, `pointer` and the
recovery members are unchanged as its encoding. Both worked examples
still use it.

This relaxes a requirement, so nothing that conformed before stops
conforming. The schema is untouched and its $id still names v0.4.0.

The rest of the repo follows: README §Errors and COMPARISON §4 no longer
claim Problem Details is the format, the OpenAPI examples say in a
comment that the shape they model is the recommended one rather than the
required one, and prose that said "problem" now names the condition.

Co-Authored-By: Claude <noreply@anthropic.com>
@christosgkoros
christosgkoros merged commit 5d57e48 into main Sep 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant