Exception: Artery::RequestError

Inherits:
Error
  • Object
show all
Defined in:
lib/artery/errors.rb

Instance Attribute Summary collapse

Attributes inherited from Error

#artery_context

Instance Method Summary collapse

Constructor Details

#initialize(uri, response, **context) ⇒ RequestError

Returns a new instance of RequestError.



20
21
22
23
24
25
# File 'lib/artery/errors.rb', line 20

def initialize(uri, response, **context)
  @uri = uri
  @response = response || {}

  super(nil, **context)
end

Instance Attribute Details

#responseObject

Returns the value of attribute response.



18
19
20
# File 'lib/artery/errors.rb', line 18

def response
  @response
end

#uriObject

Returns the value of attribute uri.



18
19
20
# File 'lib/artery/errors.rb', line 18

def uri
  @uri
end

Instance Method Details

#messageObject



27
28
29
# File 'lib/artery/errors.rb', line 27

def message
  response[:error]
end