Module Msgpack_rpc.Error

type t =
  1. | Fatal_parse_failure of string
  2. | Invalid_rpc_message of Msgpack.t
  3. | Response_for_unknown_request of Msgpack.t

Fatal_parse_failure happens when we receive data that does not conform to the Msgpack specification. Parsing stops and reader and writer will be closed.

Invalid_rpc_message happens when we receive valid Msgpack data that does not conform to the Msgpack RPC protocol.

Response_for_unknown_request happens when we receive a message that is meant to be a response to a synchronous request we sent but we don't have a record of that request (i.e., the response's message ID is unknown).

val sexp_of_t : t -> Sexplib0.Sexp.t
val to_error : t -> Core.Error.t