Exception: Deckle::RateLimitError

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

Instance Attribute Summary collapse

Attributes inherited from Error

#code, #message, #status_code

Instance Method Summary collapse

Constructor Details

#initialize(message = "Rate limit exceeded", retry_after: 1) ⇒ RateLimitError

Returns a new instance of RateLimitError.



24
25
26
27
# File 'lib/deckle/errors.rb', line 24

def initialize(message = "Rate limit exceeded", retry_after: 1)
  @retry_after = retry_after
  super(message, status_code: 429, code: "RATE_LIMITED")
end

Instance Attribute Details

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



22
23
24
# File 'lib/deckle/errors.rb', line 22

def retry_after
  @retry_after
end