Exception: TestingBot::RateLimitError
- Inherits:
-
ClientError
- Object
- StandardError
- Error
- ClientError
- TestingBot::RateLimitError
- Defined in:
- lib/testingbot/errors.rb
Overview
429 — the account hit the API rate limit. retry_after exposes the server-provided Retry-After value (seconds) when present.
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 = nil, http_status: nil, body: nil, retry_after: nil) ⇒ RateLimitError
constructor
A new instance of RateLimitError.
Constructor Details
#initialize(message = nil, http_status: nil, body: nil, retry_after: nil) ⇒ RateLimitError
Returns a new instance of RateLimitError.
40 41 42 43 |
# File 'lib/testingbot/errors.rb', line 40 def initialize( = nil, http_status: nil, body: nil, retry_after: nil) @retry_after = retry_after super(, http_status: http_status, body: body) end |
Instance Attribute Details
#retry_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
38 39 40 |
# File 'lib/testingbot/errors.rb', line 38 def retry_after @retry_after end |