Exception: GetStreamRuby::RateLimitError

Inherits:
ApiError show all
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

Attributes inherited from ApiError

#code, #details, #exception_fields, #more_info, #raw_response_body, #status_code, #unrecoverable

Instance Method Summary collapse

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_afterObject (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