Module Polymarket.Error

type http = Polymarket_http.Client.http_error = {
  1. status : int;
  2. body : string;
  3. message : string;
}

HTTP error with status code, raw body, and extracted message.

type parse = Polymarket_http.Client.parse_error = {
  1. context : string;
  2. message : string;
}

Parse error with context and message.

type network = Polymarket_http.Client.network_error = {
  1. message : string;
}

Network-level error (connection failed, timeout, etc.).

type t = Polymarket_http.Client.error =
  1. | Http_error of http
  2. | Parse_error of parse
  3. | Network_error of network
    (*

    Structured error type for all API errors.

    *)
val to_string : t -> string

Convert error to human-readable string.

val pp : Stdlib.Format.formatter -> t -> unit

Pretty printer for errors.