Exception: Resilientlink::Error

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

Overview

Raised when the ResilientLink API returns an error.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status_code: nil, body: nil) ⇒ Error

Returns a new instance of Error.



16
17
18
19
20
# File 'lib/resilientlink.rb', line 16

def initialize(message, status_code: nil, body: nil)
  super(message)
  @status_code = status_code
  @body        = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



14
15
16
# File 'lib/resilientlink.rb', line 14

def body
  @body
end

#status_codeObject (readonly)

Returns the value of attribute status_code.



14
15
16
# File 'lib/resilientlink.rb', line 14

def status_code
  @status_code
end