(** JMAP Error Types. *) open Jmap_types (** Standard Method-level error types. @see RFC 8620, Section 3.6.2 *) type method_error_type = [ | `ServerUnavailable | `ServerFail | `ServerPartialFail | `UnknownMethod | `InvalidArguments | `InvalidResultReference | `Forbidden | `AccountNotFound | `AccountNotSupportedByMethod | `AccountReadOnly | `RequestTooLarge (* From /get *) | `CannotCalculateChanges (* From /changes, /queryChanges *) | `StateMismatch (* From /set, /copy *) | `AnchorNotFound (* From /query *) | `UnsupportedSort (* From /query *) | `UnsupportedFilter (* From /query *) | `TooManyChanges (* From /queryChanges *) | `FromAccountNotFound (* From /copy, Blob/copy *) | `FromAccountNotSupportedByMethod (* From /copy *) | `Other_method_error of string (* For future or custom errors *) ] (** Standard SetError types. @see RFC 8620, Section 5.3 *) type set_error_type = [ | `Forbidden | `OverQuota | `TooLarge | `RateLimit | `NotFound | `InvalidPatch | `WillDestroy | `InvalidProperties | `Singleton | `AlreadyExists (* From /copy *) | `MailboxHasChild (* RFC 8621 *) | `MailboxHasEmail (* RFC 8621 *) | `BlobNotFound (* RFC 8621 *) | `TooManyKeywords (* RFC 8621 *) | `TooManyMailboxes (* RFC 8621 *) | `InvalidEmail (* RFC 8621 *) | `TooManyRecipients (* RFC 8621 *) | `NoRecipients (* RFC 8621 *) | `InvalidRecipients (* RFC 8621 *) | `ForbiddenMailFrom (* RFC 8621 *) | `ForbiddenFrom (* RFC 8621 *) | `ForbiddenToSend (* RFC 8621 *) | `CannotUnsend (* RFC 8621 *) | `Other_set_error of string (* For future or custom errors *) ] (** Problem details object for HTTP-level errors. @see RFC 8620, Section 3.6.1 @see RFC 7807 *) module Problem_details : sig type t val problem_type : t -> string val status : t -> int option val detail : t -> string option val limit : t -> string option val other_fields : t -> Yojson.Safe.t string_map val v : ?status:int -> ?detail:string -> ?limit:string -> ?other_fields:Yojson.Safe.t string_map -> string -> t end (** Description for method errors. May contain additional details. @see RFC 8620, Section 3.6.2 *) module Method_error_description : sig type t val description : t -> string option val v : ?description:string -> unit -> t end (** Represents a method-level error response invocation part. @see RFC 8620, Section 3.6.2 *) module Method_error : sig type t val type_ : t -> method_error_type val description : t -> Method_error_description.t option val v : ?description:Method_error_description.t -> method_error_type -> t end (** SetError object. @see RFC 8620, Section 5.3 *) module Set_error : sig type t val type_ : t -> set_error_type val description : t -> string option val properties : t -> string list option val existing_id : t -> id option val max_recipients : t -> uint option val invalid_recipients : t -> string list option val max_size : t -> uint option val not_found_blob_ids : t -> id list option val v : ?description:string -> ?properties:string list -> ?existing_id:id -> ?max_recipients:uint -> ?invalid_recipients:string list -> ?max_size:uint -> ?not_found_blob_ids:id list -> set_error_type -> t end