Exception: Bayarcash::RateLimitExceededError
- Defined in:
- lib/bayarcash/errors.rb
Overview
Raised on HTTP 429 responses. Exposes the rate-limit reset timestamp when available.
Instance Attribute Summary collapse
-
#rate_limit_resets_at ⇒ Integer?
readonly
Unix timestamp at which the rate limit resets.
Instance Method Summary collapse
-
#initialize(rate_limit_reset = nil) ⇒ RateLimitExceededError
constructor
A new instance of RateLimitExceededError.
Constructor Details
#initialize(rate_limit_reset = nil) ⇒ RateLimitExceededError
Returns a new instance of RateLimitExceededError.
33 34 35 36 |
# File 'lib/bayarcash/errors.rb', line 33 def initialize(rate_limit_reset = nil) @rate_limit_resets_at = rate_limit_reset super("Too Many Requests.") end |
Instance Attribute Details
#rate_limit_resets_at ⇒ Integer? (readonly)
Returns unix timestamp at which the rate limit resets.
31 32 33 |
# File 'lib/bayarcash/errors.rb', line 31 def rate_limit_resets_at @rate_limit_resets_at end |