Exception: SmartTodo::SlackClient::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/smart_todo/slack_client.rb

Overview

A generic error class raised when the Slack API returns back a 200 but there was a problem (permission issues …)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response_body) ⇒ Error

Returns a new instance of Error.

Parameters:

  • response_body (Hash)

    the parsed response body from Slack



19
20
21
22
23
# File 'lib/smart_todo/slack_client.rb', line 19

def initialize(response_body)
  @error_code = response_body["error"]

  super("Response body: #{response_body}")
end

Instance Attribute Details

#error_codeObject (readonly)

Returns the value of attribute error_code.



16
17
18
# File 'lib/smart_todo/slack_client.rb', line 16

def error_code
  @error_code
end