Exception: Zanshin::SDK::Request::ZanshinError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/zanshin/request/zanshin_request_error.rb

Overview

Zanshin SDK request ZanshinError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, body) ⇒ ZanshinError

Initialize a new Zanshin Error

Parameters:

  • code (String)

    of the Error

  • body (String)

    message of the error



14
15
16
17
18
# File 'lib/zanshin/request/zanshin_request_error.rb', line 14

def initialize(code, body)
  @code = code
  @body = body
  super("Error [#{code}] #{body}")
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



8
9
10
# File 'lib/zanshin/request/zanshin_request_error.rb', line 8

def body
  @body
end

#codeObject (readonly)

Returns the value of attribute code.



8
9
10
# File 'lib/zanshin/request/zanshin_request_error.rb', line 8

def code
  @code
end