Expand description
Generic JMAP method handlers shared across all server crates.
Each function handles one RFC 8620 operation type for any object type O
and any backend B: JmapBackend. Domain crates call these for types that
have no domain-specific logic beyond the standard wire protocol.
§Backend-error leak policy (bd:JMAP-wlip.2)
Every handler in this module that maps a JmapBackend::Error to a
wire-format JmapError::server_fail MUST use the static description
SERVER_FAIL_INTERNAL_DESC rather than interpolating the backend
error’s Display output. The backend-error
contract on JmapBackend::Error (crate::backend::JmapBackend’s
associated-type doc comment) forbids credential / blob / PII in
Display, but a single accidental violation by a backend implementor
would land the leaked text in serverFail.description on every
affected response. Stripping the description at the handler layer
changes that from a wire-format security incident into a server-side
diagnostic gap that the operator can close with its own structured
logger wrapping the backend call.
Extension *-server crates with their own per-method handlers
SHOULD follow the same pattern; the helper server_fail_from_backend
exists so each call site is one line and reviewable at a glance.
Constants§
- SERVER_
FAIL_ INTERNAL_ DESC - Static description used for every
serverFailinvocation that wraps aJmapBackend::Error(bd:JMAP-wlip.2).
Functions§
- handle_
changes - Generic
*/changeshandler (RFC 8620 §5.2). - handle_
get - Generic
*/gethandler (RFC 8620 §5.1). - handle_
query - Generic
*/queryhandler (RFC 8620 §5.5). - handle_
query_ changes - Generic
*/queryChangeshandler (RFC 8620 §5.6). - server_
fail_ from_ backend - Construct a
JmapError::server_failfor a backend-originated error without echoing the backend error’sDisplayoutput onto the wire (bd:JMAP-wlip.2). - server_
fail_ value_ from_ backend - Construct the per-id
serverFailValueused inside thenotCreated/notUpdated/notDestroyedmaps of/setresponses (bd:JMAP-ic0j.68), without echoing the backend error’sDisplayoutput onto the wire.