Exception: Chatrix::RequestError

Inherits:
ApiError show all
Defined in:
lib/chatrix/errors.rb

Overview

Error raised when a request is badly formatted.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error) ⇒ RequestError

Returns a new instance of RequestError


14
15
16
17
# File 'lib/chatrix/errors.rb', line 14

def initialize(error)
  @code = error['errcode']
  @api_message = error['error']
end

Instance Attribute Details

#api_messageObject (readonly)

Returns the value of attribute api_message


12
13
14
# File 'lib/chatrix/errors.rb', line 12

def api_message
  @api_message
end

#codeObject (readonly)

Returns the value of attribute code


12
13
14
# File 'lib/chatrix/errors.rb', line 12

def code
  @code
end