Exception: Slk::RateLimitError

Inherits:
ApiError show all
Defined in:
lib/slk.rb

Overview

Slack rate-limit error. Carries Retry-After in seconds when present.

Instance Attribute Summary collapse

Attributes inherited from ApiError

#code

Instance Method Summary collapse

Constructor Details

#initialize(message, retry_after: nil) ⇒ RateLimitError

Returns a new instance of RateLimitError.



37
38
39
40
# File 'lib/slk.rb', line 37

def initialize(message, retry_after: nil)
  super(message, code: :ratelimited)
  @retry_after = retry_after
end

Instance Attribute Details

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



35
36
37
# File 'lib/slk.rb', line 35

def retry_after
  @retry_after
end