Exception: OctaSpace::RateLimitError

Inherits:
ApiError show all
Defined in:
lib/octaspace/errors.rb

Overview

429 Too Many Requests — includes Retry-After header value

Instance Attribute Summary collapse

Attributes inherited from Error

#request_id, #response, #status

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, response: nil) ⇒ RateLimitError

Returns a new instance of RateLimitError.



69
70
71
72
# File 'lib/octaspace/errors.rb', line 69

def initialize(message = nil, response: nil)
  @retry_after = response&.retry_after
  super
end

Instance Attribute Details

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



67
68
69
# File 'lib/octaspace/errors.rb', line 67

def retry_after
  @retry_after
end