Exception: GetStreamRuby::RateLimitError
- Inherits:
-
ApiError
- Object
- StandardError
- StreamError
- ApiError
- GetStreamRuby::RateLimitError
- Defined in:
- lib/getstream_ruby/errors.rb
Overview
Raised on HTTP 429. Adds parsed ‘Retry-After` as Float seconds, or nil when the header is absent or unparseable. Per RFC 7231, both integer-seconds and HTTP-date forms are supported. Past HTTP-dates clamp to 0.
Instance Attribute Summary collapse
-
#retry_after ⇒ Object
readonly
Returns the value of attribute retry_after.
Attributes inherited from ApiError
#code, #details, #exception_fields, #more_info, #raw_response_body, #status_code, #unrecoverable
Instance Method Summary collapse
-
#initialize(retry_after: nil, **kwargs) ⇒ RateLimitError
constructor
A new instance of RateLimitError.
Constructor Details
#initialize(retry_after: nil, **kwargs) ⇒ RateLimitError
Returns a new instance of RateLimitError.
44 45 46 47 |
# File 'lib/getstream_ruby/errors.rb', line 44 def initialize(retry_after: nil, **kwargs) super(**kwargs) @retry_after = retry_after end |
Instance Attribute Details
#retry_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
42 43 44 |
# File 'lib/getstream_ruby/errors.rb', line 42 def retry_after @retry_after end |