Exception: OmniSocials::RateLimitError
- Defined in:
- lib/omnisocials/errors.rb
Overview
429 - rate limit exceeded (100 requests per minute).
#retry_after is the number of seconds to wait before retrying, taken from the Retry-After header (or the body's retry_after field) when present.
Instance Attribute Summary collapse
-
#retry_after ⇒ Object
readonly
Returns the value of attribute retry_after.
Attributes inherited from APIError
Instance Method Summary collapse
-
#initialize(message, status: 429, code: nil, body: nil, retry_after: nil) ⇒ RateLimitError
constructor
A new instance of RateLimitError.
Constructor Details
#initialize(message, status: 429, code: nil, body: nil, retry_after: nil) ⇒ RateLimitError
Returns a new instance of RateLimitError.
59 60 61 62 |
# File 'lib/omnisocials/errors.rb', line 59 def initialize(, status: 429, code: nil, body: nil, retry_after: nil) super(, status: status, code: code, body: body) @retry_after = retry_after end |
Instance Attribute Details
#retry_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
57 58 59 |
# File 'lib/omnisocials/errors.rb', line 57 def retry_after @retry_after end |