class Slack::Web::Api::Errors::TooManyRequestsError

Attributes

response[R]

Public Class Methods

new(response) click to toggle source
# File lib/slack/web/api/errors/too_many_requests_error.rb, line 9
def initialize(response)
  @response = response
end

Public Instance Methods

message() click to toggle source
# File lib/slack/web/api/errors/too_many_requests_error.rb, line 13
def message
  "Retry after #{retry_after} seconds"
end
retry_after() click to toggle source
# File lib/slack/web/api/errors/too_many_requests_error.rb, line 17
def retry_after
  response.headers['retry-after'].to_i
end