Exception: Verity::RateLimitError

Inherits:
APIError
  • Object
show all
Defined in:
lib/verity/errors.rb

Instance Attribute Summary collapse

Attributes inherited from APIError

#code, #details, #status_code

Instance Method Summary collapse

Constructor Details

#initialize(message, code: nil, details: nil, limit: nil, remaining: nil, reset: nil) ⇒ RateLimitError

Returns a new instance of RateLimitError.



36
37
38
39
40
41
# File 'lib/verity/errors.rb', line 36

def initialize(message, code: nil, details: nil, limit: nil, remaining: nil, reset: nil)
  super(message, code: code, details: details, status_code: 429)
  @limit = limit
  @remaining = remaining
  @reset = reset
end

Instance Attribute Details

#limitObject (readonly)

Returns the value of attribute limit.



34
35
36
# File 'lib/verity/errors.rb', line 34

def limit
  @limit
end

#remainingObject (readonly)

Returns the value of attribute remaining.



34
35
36
# File 'lib/verity/errors.rb', line 34

def remaining
  @remaining
end

#resetObject (readonly)

Returns the value of attribute reset.



34
35
36
# File 'lib/verity/errors.rb', line 34

def reset
  @reset
end