Exception: Koine::RestClient::Error

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

Overview

base class for http errors

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Error

Returns a new instance of Error.



11
12
13
# File 'lib/koine/rest_client/errors.rb', line 11

def initialize(response)
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



9
10
11
# File 'lib/koine/rest_client/errors.rb', line 9

def response
  @response
end

Instance Method Details

#messageObject



15
16
17
# File 'lib/koine/rest_client/errors.rb', line 15

def message
  @message ||= @response&.body
end