package reddit_api_kernel

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

An Api_error.t represents a "normal" error when making an API request.

"Normal" includes transient errors such as a loss of connectivity or HTTP responses representing temporary server issues. It also includes HTTP responses indicating an illegal operation, such as permission errors.

It does not include programming errors within Reddit_api_kernel; if we can't parse a response, we raise instead of returning an error value.

type t =
  1. | Cohttp_raised of Core_kernel.Exn.t
  2. | Reddit_reported_error of Cohttp.Response.t * Cohttp.Body.t
val sexp_of_t : t -> Sexplib0.Sexp.t
OCaml

Innovation. Community. Security.