Exception: DIDKit::APIError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ APIError

Returns a new instance of APIError.



8
9
10
11
# File 'lib/didkit/errors.rb', line 8

def initialize(response)
  @response = response
  super("APIError: #{response}")
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



6
7
8
# File 'lib/didkit/errors.rb', line 6

def response
  @response
end

Instance Method Details

#bodyObject



17
18
19
# File 'lib/didkit/errors.rb', line 17

def body
  response.body
end

#statusObject



13
14
15
# File 'lib/didkit/errors.rb', line 13

def status
  response.code.to_i
end