package polymarket
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
OCaml client library for the Polymarket prediction market API
Install
dune-project
Dependency
Authors
Maintainers
Sources
0.2.0.tar.gz
md5=4eb4c5d2f63ff081c9713d90be5a51b2
sha512=0e3de0c9b40683e09ab8f9f966a44784ef1b9b482c3eefef84104a7e8042c92f1d79893ee9588b24fa3d0decaed7f365509f4d1c23c66ce8328efb64e721f276
doc/polymarket.common/Polymarket_common/Error/index.html
Module Polymarket_common.ErrorSource
Polymorphic error types for composable error handling.
This module provides extensible error types using polymorphic variants, allowing different parts of the codebase to define their own error cases while maintaining composability.
Base Error Types
HTTP-related errors.
JSON parsing errors.
Network/connection errors.
Rate limiting errors.
Polymorphic Error Variants
Source
type http_errors = [ | `Http_error of http_error| `Parse_error of parse_error| `Network_error of network_error
]Core HTTP client errors.
Rate limiting errors.
All API errors (HTTP + rate limiting).
Error Constructors
Source
val http_error :
status:int ->
body:string ->
message:string ->
[> `Http_error of http_error ]Construct an HTTP error.
Construct a parse error.
Construct a network error.
Source
val rate_limited :
retry_after:float ->
route_key:string ->
[> `Rate_limited of rate_limit_error ]Construct a rate limit error.
Error Formatting
Convert HTTP errors to string.
Convert API errors (including rate limiting) to string.
Pretty Printers
Error Parsing Helpers
Parse an HTTP error response body to extract error message.
Result Helpers
Map over the error type of a result.
Lift an http_errors result to an api_errors result.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page