Exception: FDE::Slack::APIError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/slack/util/http_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ APIError

Returns a new instance of APIError.



14
15
16
# File 'lib/slack/util/http_client.rb', line 14

def initialize(response)
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



12
13
14
# File 'lib/slack/util/http_client.rb', line 12

def response
  @response
end

Instance Method Details

#messageObject



18
19
20
21
22
23
# File 'lib/slack/util/http_client.rb', line 18

def message
  <<-MSG
The slack API returned an error with HTTP Code #{@response.code}
Check the "Handling Errors" section on https://api.slack.com/incoming-webhooks for more information
  MSG
end