Exception: Whoosh::Errors::RateLimitExceeded
- Inherits:
-
HttpError
- Object
- StandardError
- WhooshError
- HttpError
- Whoosh::Errors::RateLimitExceeded
- Defined in:
- lib/whoosh/errors.rb
Instance Attribute Summary collapse
-
#retry_after ⇒ Object
readonly
Returns the value of attribute retry_after.
Attributes inherited from HttpError
Instance Method Summary collapse
-
#initialize(message = "Rate limit exceeded", retry_after: 60) ⇒ RateLimitExceeded
constructor
A new instance of RateLimitExceeded.
- #to_h ⇒ Object
Constructor Details
#initialize(message = "Rate limit exceeded", retry_after: 60) ⇒ RateLimitExceeded
Returns a new instance of RateLimitExceeded.
55 56 57 58 |
# File 'lib/whoosh/errors.rb', line 55 def initialize( = "Rate limit exceeded", retry_after: 60) @retry_after = retry_after super(, status: 429, error_type: "rate_limited") end |
Instance Attribute Details
#retry_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
53 54 55 |
# File 'lib/whoosh/errors.rb', line 53 def retry_after @retry_after end |
Instance Method Details
#to_h ⇒ Object
60 61 62 |
# File 'lib/whoosh/errors.rb', line 60 def to_h super.merge(retry_after: retry_after) end |