Exception: Bayarcash::RateLimitExceededError

Inherits:
Error
  • Object
show all
Defined in:
lib/bayarcash/errors.rb

Overview

Raised on HTTP 429 responses. Exposes the rate-limit reset timestamp when available.

Instance Attribute Summary collapse

Instance Method Summary collapse

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_atInteger? (readonly)

Returns unix timestamp at which the rate limit resets.

Returns:

  • (Integer, nil)

    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