Exception: Deckle::RateLimitError
- Defined in:
- lib/deckle/errors.rb
Instance Attribute Summary collapse
-
#retry_after ⇒ Object
readonly
Returns the value of attribute retry_after.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(message = "Rate limit exceeded", retry_after: 1) ⇒ RateLimitError
constructor
A new instance of RateLimitError.
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( = "Rate limit exceeded", retry_after: 1) @retry_after = retry_after super(, status_code: 429, code: "RATE_LIMITED") end |
Instance Attribute Details
#retry_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
22 23 24 |
# File 'lib/deckle/errors.rb', line 22 def retry_after @retry_after end |