Exception: Gateway::BadResponse

Inherits:
BadGateway show all
Defined in:
lib/gateway/errors.rb

Overview

When a response is returned, but is considered unsuccessful. This is application specific. For HTTP responses: 4xx, 5xx can be considered bad response

Instance Attribute Summary collapse

Attributes inherited from Error

#inner_error, #status

Instance Method Summary collapse

Methods inherited from Error

wrap

Constructor Details

#initialize(msg, info = nil) ⇒ BadResponse

Returns a new instance of BadResponse.



33
34
35
36
37
# File 'lib/gateway/errors.rb', line 33

def initialize(msg, info=nil)
  msg = "#{msg}\nInfo:\n#{info.inspect}" if info
  super msg
  self.info = info
end

Instance Attribute Details

#infoObject

Returns the value of attribute info.



32
33
34
# File 'lib/gateway/errors.rb', line 32

def info
  @info
end