Errors#
RFC 8620 Section 3.6.2 defines the error types a JMAP method call can return; JMAPMethodError carries one of these as its error_type attribute. See its docstring below for the full list.
JMAP error hierarchy.
RFC 8620 Section 3.6.2 defines the standard method-level error types.
If caldav happens to be installed alongside this package, JMAPError and
JMAPAuthError subclass its DAVError/AuthorizationError too, so code that
catches caldav.lib.error.DAVError around CalDAV calls also catches JMAP
errors raised here. There is no hard dependency on caldav, just an optional
compatibility hook when it’s present.
- exception calendaring_jmap.error.JMAPAuthError(url: str | None = None, reason: str | None = None, error_type: str | None = None)[source]#
Bases:
_CaldavAuthorizationError,JMAPErrorHTTP 401 or 403 received from a JMAP server.
JMAP does not use a 401-challenge-retry dance. A 401/403 on the session GET or any API call is a hard failure.
- exception calendaring_jmap.error.JMAPBaseError(url: str | None = None, reason: str | None = None)[source]#
Bases:
_CaldavDAVErrorBase for all calendaring-jmap errors: a URL, a reason, nothing more.
- exception calendaring_jmap.error.JMAPCapabilityError(url: str | None = None, reason: str | None = None, error_type: str | None = None)[source]#
Bases:
JMAPErrorServer does not advertise the required JMAP capability.
Raised when the Session object returned by the server does not include
urn:ietf:params:jmap:calendarsin the account capabilities.
- exception calendaring_jmap.error.JMAPError(url: str | None = None, reason: str | None = None, error_type: str | None = None)[source]#
Bases:
JMAPBaseErrorBase class for all JMAP protocol errors.
Adds
error_typeto carry the RFC 8620 error type string (e.g."unknownMethod","invalidArguments").
- exception calendaring_jmap.error.JMAPMethodError(url: str | None = None, reason: str | None = None, error_type: str | None = None)[source]#
Bases:
JMAPErrorA JMAP method call returned an error response.
RFC 8620 Section 3.6.2 generic error types that may be set as
error_type:serverUnavailable: temporary, retrying later may succeedserverFail: unexpected server-side error (default here, used when the server’s response omitstypeentirely)serverPartialFail: partial failure, some calls succeededunknownMethod: method name not recognisedinvalidArguments: bad argument types or valuesinvalidResultReference: bad#resultreferenceforbidden: not allowed to perform this callaccountNotFound:accountIddoes not existaccountNotSupportedByMethod: account lacks needed capabilityaccountReadOnly: account is read-only
Individual methods define further, method-specific error types beyond this generic set (e.g.
notFound,calendarHasEvent,expandDurationTooLarge); see each method builder’s own docstring.