Exception: SlackBot::Errors::SlackResponseError

Inherits:
SlackBot::Error
  • Object
show all
Defined in:
lib/slack_bot/errors.rb,
sig/slack_bot.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error, data: nil, payload: nil) ⇒ SlackResponseError

Returns a new instance of SlackResponseError.

Parameters:

  • error (String)
  • data: (Hash[String, untyped], nil) (defaults to: nil)
  • payload: (Hash[String, untyped], nil) (defaults to: nil)


56
57
58
59
60
# File 'lib/slack_bot/errors.rb', line 56

def initialize(error, data: nil, payload: nil)
  @error = error
  @data = data
  @payload = payload
end

Instance Attribute Details

#dataHash[String, untyped]? (readonly)

Returns the value of attribute data.

Returns:

  • (Hash[String, untyped], nil)


55
56
57
# File 'lib/slack_bot/errors.rb', line 55

def data
  @data
end

#errorString (readonly)

Returns the value of attribute error.

Returns:

  • (String)


55
56
57
# File 'lib/slack_bot/errors.rb', line 55

def error
  @error
end

#payloadHash[String, untyped]? (readonly)

Returns the value of attribute payload.

Returns:

  • (Hash[String, untyped], nil)


55
56
57
# File 'lib/slack_bot/errors.rb', line 55

def payload
  @payload
end