Exception: Inforouter::Errors::SOAPError

Inherits:
InforouterError show all
Defined in:
lib/inforouter/errors/soap_error.rb

Overview

This error is raised when a SOAP call fails.

Constant Summary

Constants inherited from InforouterError

InforouterError::BASE_KEY

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from InforouterError

#compose_message

Constructor Details

#initialize(e) ⇒ SOAPError

Returns a new instance of SOAPError.



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/inforouter/errors/soap_error.rb', line 9

def initialize(e)
  @fault = e
  e.to_hash.tap do |fault|
    fault_code = fault[:fault][:faultcode]
    fault_string = parse_fault(fault[:fault][:faultstring])
    super(compose_message('soap_error',
                          message: fault_string,
                          code: fault_code
    ))
  end
end

Instance Attribute Details

#faultObject (readonly)

Original SOAP fault.



7
8
9
# File 'lib/inforouter/errors/soap_error.rb', line 7

def fault
  @fault
end