Exception: Scanii::RateLimitError

Inherits:
Error
  • Object
show all
Defined in:
lib/scanii/error.rb

Overview

Raised on HTTP 429. retry_after carries the value of the Retry-After response header in seconds when the server provided one.

Instance Attribute Summary collapse

Attributes inherited from Error

#body, #host_id, #request_id, #status_code

Instance Method Summary collapse

Constructor Details

#initialize(message, retry_after: nil) ⇒ RateLimitError

Returns a new instance of RateLimitError.



31
32
33
34
# File 'lib/scanii/error.rb', line 31

def initialize(message, retry_after: nil, **)
  super(message, **)
  @retry_after = retry_after
end

Instance Attribute Details

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



29
30
31
# File 'lib/scanii/error.rb', line 29

def retry_after
  @retry_after
end