class Aptible::BillForward::ResponseError
Attributes
body[RW]
response[RW]
Public Class Methods
new(message, attrs = {})
click to toggle source
Calls superclass method
Aptible::BillForward::Exception::new
# File lib/aptible/billforward/exceptions.rb, line 16 def initialize(message, attrs = {}) self.response = attrs[:response] self.body = attrs[:body] if body.present? && body.key?(:errorMessage) error = body[:errorMessage] message = "#{message} (#{error})" elsif response message = "#{message} (\"#{response.inspect}\")" end super(message, attrs) end