Exception: Zazu::RateLimitError

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

Overview

429 — rate limited. Retry after the ‘Retry-After` header (seconds).

Instance Attribute Summary collapse

Attributes inherited from Error

#body, #param, #request_id, #status, #type

Instance Method Summary collapse

Methods inherited from Error

#to_h

Constructor Details

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

Returns a new instance of RateLimitError.



53
54
55
56
# File 'lib/zazu/errors.rb', line 53

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

Instance Attribute Details

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



51
52
53
# File 'lib/zazu/errors.rb', line 51

def retry_after
  @retry_after
end