Exception: Anakin::RateLimitError
- Defined in:
- lib/anakin/errors.rb
Overview
429 — rate limited after the SDK exhausted its retry budget.
Instance Attribute Summary collapse
-
#retry_after ⇒ Object
readonly
Seconds the API asked the client to wait, or 0 if the header was absent.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(message, status: 429, code: nil, retry_after: 0) ⇒ RateLimitError
constructor
A new instance of RateLimitError.
Constructor Details
#initialize(message, status: 429, code: nil, retry_after: 0) ⇒ RateLimitError
Returns a new instance of RateLimitError.
36 37 38 39 |
# File 'lib/anakin/errors.rb', line 36 def initialize(, status: 429, code: nil, retry_after: 0) super(, status: status, code: code) @retry_after = retry_after end |
Instance Attribute Details
#retry_after ⇒ Object (readonly)
Seconds the API asked the client to wait, or 0 if the header was absent.
34 35 36 |
# File 'lib/anakin/errors.rb', line 34 def retry_after @retry_after end |