Exception: Api2Convert::RateLimitError
- Defined in:
- lib/api2convert/errors.rb
Overview
Too many requests (HTTP 429), raised only once auto-retries are exhausted.
Instance Attribute Summary collapse
-
#retry_after ⇒ Integer?
readonly
Seconds to wait before retrying, parsed from the
Retry-Afterheader (raw, uncapped).
Attributes inherited from ApiError
#body, #request_id, #status_code
Instance Method Summary collapse
-
#initialize(message, status_code: 429, request_id: nil, body: nil, retry_after: nil) ⇒ RateLimitError
constructor
A new instance of RateLimitError.
Constructor Details
#initialize(message, status_code: 429, request_id: nil, body: nil, retry_after: nil) ⇒ RateLimitError
Returns a new instance of RateLimitError.
54 55 56 57 |
# File 'lib/api2convert/errors.rb', line 54 def initialize(, status_code: 429, request_id: nil, body: nil, retry_after: nil) super(, status_code: status_code, request_id: request_id, body: body) @retry_after = retry_after end |
Instance Attribute Details
#retry_after ⇒ Integer? (readonly)
Returns seconds to wait before retrying, parsed from the
Retry-After header (raw, uncapped).
52 53 54 |
# File 'lib/api2convert/errors.rb', line 52 def retry_after @retry_after end |