Exception: LabClient::Error

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

Overview

Class Shim

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resp) ⇒ Error

Returns a new instance of Error.



7
8
9
10
# File 'lib/labclient/error.rb', line 7

def initialize(resp)
  super
  @resp = resp
end

Instance Attribute Details

#respObject (readonly)

Returns the value of attribute resp.



5
6
7
# File 'lib/labclient/error.rb', line 5

def resp
  @resp
end

Instance Method Details

#error_detailsObject

Helper for Raising Exceptions



13
14
15
# File 'lib/labclient/error.rb', line 13

def error_details
  { code: resp.code, message: resp.find_friendly_error }
end