ReqThrottle.RateLimitError exception (req_throttle v0.2.0)

Copy Markdown View Source

Error struct returned when rate limit is exceeded.

This struct contains information about the rate limit that was exceeded. When used in error mode, this struct is available in the exception or in the request's private map.

Summary

Functions

Creates a new RateLimitError exception.

Creates a new RateLimitError struct (for backward compatibility).

Types

t()

@type t() :: %ReqThrottle.RateLimitError{
  __exception__: true,
  key: String.t(),
  message: String.t(),
  retry_after_ms: non_neg_integer()
}

Functions

exception(msg)

Creates a new RateLimitError exception.

new(key, retry_after_ms)

Creates a new RateLimitError struct (for backward compatibility).