Exception: TaxCloud::Errors::SoapError
- Inherits:
-
TaxCloudError
- Object
- StandardError
- TaxCloudError
- TaxCloud::Errors::SoapError
- Defined in:
- lib/tax_cloud/errors/soap_error.rb
Overview
This error is raised when a SOAP call fails.
Instance Attribute Summary collapse
-
#fault ⇒ Object
readonly
Original SOAP failt.
Attributes inherited from TaxCloudError
#problem, #resolution, #summary
Instance Method Summary collapse
-
#initialize(e) ⇒ SoapError
constructor
Create the new error.
Methods inherited from TaxCloudError
Constructor Details
#initialize(e) ⇒ SoapError
Create the new error.
Parameters
- e
-
SOAP response.
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/tax_cloud/errors/soap_error.rb', line 12 def initialize(e) @fault = e e.to_hash.tap do |fault| fault_code = fault[:fault][:faultcode] fault_string = parse_fault(fault[:fault][:faultstring]) super(('soap_error', message: fault_string, code: fault_code )) end end |
Instance Attribute Details
#fault ⇒ Object (readonly)
Original SOAP failt.
7 8 9 |
# File 'lib/tax_cloud/errors/soap_error.rb', line 7 def fault @fault end |