JMAP: an unknown capability is unknownCapability, not notRequest #210

Merged
jcoffey-dev merged 1 commits from fix/unknown-capability into main 2026-10-26 16:01:49 +00:00
Owner

A request whose using names a capability the server doesn't offer failed as a parse error and came back as notRequest. RFC 8620 section 3.6.1 says unknownCapability, and that's what a client can act on: an old capability name or a feature this server doesn't have.

using now parses without failing and keeps the first unknown name. Request and WebSocket parsing then fail with the existing UnknownCapability event, which already maps to the right error type, with the name in detail.

Tests cover HTTP and WebSocket requests, and check that a known capability still parses.

A request whose `using` names a capability the server doesn't offer failed as a parse error and came back as `notRequest`. RFC 8620 section 3.6.1 says `unknownCapability`, and that's what a client can act on: an old capability name or a feature this server doesn't have. `using` now parses without failing and keeps the first unknown name. Request and WebSocket parsing then fail with the existing `UnknownCapability` event, which already maps to the right error type, with the name in `detail`. Tests cover HTTP and WebSocket requests, and check that a known capability still parses.
jcoffey-dev added 1 commit 2026-10-26 15:41:04 +00:00
JMAP: an unknown capability in "using" is unknownCapability
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 20m26s
f95c64c698
A request naming a capability the server doesn't offer failed as a whole
parse error, so the client got notRequest with serde's message. RFC 8620
section 3.6.1 says unknownCapability, and a client that checks for it can
tell the user what's wrong (an old capability name, a feature this server
doesn't have).

"using" now parses without failing and keeps the first unknown name;
Request::parse and WebSocketMessage::parse then fail with
JmapEvent::UnknownCapability, which already maps to the error type, with
the name as its detail.
jcoffey-dev merged commit f0cd18774a into main 2026-10-26 16:01:49 +00:00
jcoffey-dev deleted branch fix/unknown-capability 2026-10-26 16:01:49 +00:00
Sign in to join this conversation.