Exception: PolyLingo::RateLimitError

Inherits:
PolyLingoError show all
Defined in:
lib/polylingo/errors.rb

Overview

Rate limited (HTTP 429).

Instance Attribute Summary collapse

Attributes inherited from PolyLingoError

#error, #status

Instance Method Summary collapse

Constructor Details

#initialize(status, error, message, retry_after = nil) ⇒ RateLimitError

Returns a new instance of RateLimitError.



23
24
25
26
# File 'lib/polylingo/errors.rb', line 23

def initialize(status, error, message, retry_after = nil)
  super(status, error, message)
  @retry_after = retry_after
end

Instance Attribute Details

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



21
22
23
# File 'lib/polylingo/errors.rb', line 21

def retry_after
  @retry_after
end