Exception: RunApi::Core::RateLimitError
- Defined in:
- lib/runapi/core/errors.rb
Overview
Raised when rate limit is exceeded (HTTP 429). Includes retry-after delay.
Constant Summary
Constants inherited from Error
Error::DEFAULT_MESSAGES, Error::STATUS_MAP
Instance Attribute Summary collapse
-
#retry_after ⇒ Numeric?
readonly
Suggested retry delay in seconds from Retry-After header.
Attributes inherited from Error
#details, #request_id, #status
Instance Method Summary collapse
-
#initialize(message = "Too many requests", retry_after: nil, **kwargs) ⇒ RateLimitError
constructor
A new instance of RateLimitError.
Methods inherited from Error
Constructor Details
#initialize(message = "Too many requests", retry_after: nil, **kwargs) ⇒ RateLimitError
Returns a new instance of RateLimitError.
170 171 172 173 |
# File 'lib/runapi/core/errors.rb', line 170 def initialize( = "Too many requests", retry_after: nil, **kwargs) super(, status: 429, **kwargs) @retry_after = retry_after end |
Instance Attribute Details
#retry_after ⇒ Numeric? (readonly)
Returns Suggested retry delay in seconds from Retry-After header.
168 169 170 |
# File 'lib/runapi/core/errors.rb', line 168 def retry_after @retry_after end |