#[non_exhaustive]pub enum MethodErrorType {
Show 24 variants
UnknownCapability,
NotJson,
NotRequest,
Limit,
ServerUnavailable,
ServerFail,
ServerPartialFail,
UnknownMethod,
InvalidArguments,
InvalidResultReference,
Forbidden,
AccountNotFound,
AccountNotSupportedByMethod,
AccountReadOnly,
RequestTooLarge,
CannotCalculateChanges,
StateMismatch,
FromAccountNotFound,
FromAccountNotSupportedByMethod,
AnchorNotFound,
UnsupportedSort,
UnsupportedFilter,
TooManyChanges,
Other(String),
}Expand description
The machine-readable type of a JmapError.
Known variants are the RFC 8620 request-level error types (§3.6.1,
whose wire form in an RFC 7807 problem-details body is prefixed with
urn:ietf:params:jmap:error:), the §3.6.2 method-level error types,
and the method-specific errors of §5.1 to §5.6. Every other wire
string, including extension errors such as "rateLimited", is
Self::Other.
From<&str> and Deserialize share one mapping: a known wire string
always builds its typed variant, never Other.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownCapability
RFC 8620 §3.6.1 — the request used an unsupported capability.
NotJson
RFC 8620 §3.6.1 — the content type was not application/json or
the request did not parse as I-JSON.
NotRequest
RFC 8620 §3.6.1 — the request parsed as JSON but not as a Request object.
Limit
RFC 8620 §3.6.1 — the request exceeded a server limit; the limit’s
name is JmapError::limit_name.
RFC 8620 §3.6.2 — an internal server resource was temporarily unavailable.
ServerFail
RFC 8620 §3.6.2 — an unexpected error occurred.
ServerPartialFail
RFC 8620 §3.6.2 — some, but not all, expected changes were made.
UnknownMethod
RFC 8620 §3.6.2 — the server does not recognise this method name.
InvalidArguments
RFC 8620 §3.6.2 — an argument is of the wrong type or invalid.
InvalidResultReference
RFC 8620 §3.6.2 — a result reference failed to resolve.
Forbidden
RFC 8620 §3.6.2 — the method or arguments are forbidden.
AccountNotFound
RFC 8620 §3.6.2 — the accountId does not correspond to a valid
account.
AccountNotSupportedByMethod
RFC 8620 §3.6.2 — the account does not support this method.
AccountReadOnly
RFC 8620 §3.6.2 — the account is read-only.
RequestTooLarge
RFC 8620 §5.1 and §5.3 — too many ids or objects in one call.
CannotCalculateChanges
RFC 8620 §5.2 and §5.6 — the server cannot calculate the changes from the given state.
StateMismatch
RFC 8620 §5.3 and §5.4 — ifInState did not match the current
state.
FromAccountNotFound
RFC 8620 §5.4 — the fromAccountId does not correspond to a valid
account.
FromAccountNotSupportedByMethod
RFC 8620 §5.4 — the fromAccountId account does not support this
method.
AnchorNotFound
RFC 8620 §5.5 — the anchor was not found in the results.
UnsupportedSort
RFC 8620 §5.5 — the sort is syntactically valid but unsupported.
UnsupportedFilter
RFC 8620 §5.5 — the filter is syntactically valid but unsupported.
TooManyChanges
RFC 8620 §5.6 — there are more changes than maxChanges.
Other(String)
Any other error type, such as an extension’s.