TypeSafe.RateLimitError exception (TypeSafe v0.2.2)

Copy Markdown View Source

The rate limit was exceeded (HTTP 429).

In addition to the shared HTTP error fields, :retry_after_ms holds the server's requested wait in milliseconds parsed from the retry-after/retry-after-ms headers, or nil when absent.

Summary

Types

t()

@type t() :: %TypeSafe.RateLimitError{
  __exception__: term(),
  body: term(),
  endpoint: String.t() | nil,
  headers: %{optional(String.t()) => String.t()},
  message: String.t(),
  request_id: String.t() | nil,
  retry_after_ms: number() | nil,
  status: pos_integer()
}