Exception: Apertur::RateLimitError
- Defined in:
- lib/apertur/errors.rb
Overview
Raised when the API returns a 429 Too Many Requests response.
Instance Attribute Summary collapse
-
#retry_after ⇒ Integer?
readonly
seconds to wait before retrying.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(message = "Rate limit exceeded", retry_after: nil) ⇒ RateLimitError
constructor
A new instance of RateLimitError.
Constructor Details
#initialize(message = "Rate limit exceeded", retry_after: nil) ⇒ RateLimitError
Returns a new instance of RateLimitError.
43 44 45 46 |
# File 'lib/apertur/errors.rb', line 43 def initialize( = "Rate limit exceeded", retry_after: nil) super(, status_code: 429, code: "RATE_LIMIT") @retry_after = retry_after end |
Instance Attribute Details
#retry_after ⇒ Integer? (readonly)
seconds to wait before retrying
38 39 40 |
# File 'lib/apertur/errors.rb', line 38 def retry_after @retry_after end |