Exception: Kintone::KintoneError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/kintone/kintone_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(messages, http_status) ⇒ KintoneError

Returns a new instance of KintoneError.



4
5
6
7
8
9
10
# File 'lib/kintone/kintone_error.rb', line 4

def initialize(messages, http_status)
  @message_text = messages['message']
  @id = messages['id']
  @code = messages['code']
  @http_status = http_status
  super(format('%s [%s] %s(%s)', @http_status, @code, @message_text, @id))
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



2
3
4
# File 'lib/kintone/kintone_error.rb', line 2

def code
  @code
end

#http_statusObject (readonly)

Returns the value of attribute http_status.



2
3
4
# File 'lib/kintone/kintone_error.rb', line 2

def http_status
  @http_status
end

#idObject (readonly)

Returns the value of attribute id.



2
3
4
# File 'lib/kintone/kintone_error.rb', line 2

def id
  @id
end

#message_textObject (readonly)

Returns the value of attribute message_text.



2
3
4
# File 'lib/kintone/kintone_error.rb', line 2

def message_text
  @message_text
end