Exception: TrueTrial::RateLimitError
- Defined in:
- lib/truetrial/errors.rb
Overview
Raised when the rate limit is exceeded (HTTP 429).
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: nil, response_body: nil) ⇒ RateLimitError
constructor
A new instance of RateLimitError.
Constructor Details
#initialize(message = "Rate limit exceeded", retry_after: nil, response_body: nil) ⇒ RateLimitError
Returns a new instance of RateLimitError.
43 44 45 46 |
# File 'lib/truetrial/errors.rb', line 43 def initialize( = "Rate limit exceeded", retry_after: nil, response_body: nil) @retry_after = retry_after super(, status_code: 429, response_body: response_body) end |
Instance Attribute Details
#retry_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
41 42 43 |
# File 'lib/truetrial/errors.rb', line 41 def retry_after @retry_after end |