class Softlayer::Errors::SoapError
This error is raised when a SOAP call fails.
Attributes
fault[R]
Original SOAP failt.
Public Class Methods
new(e)
click to toggle source
Create the new error.
Parameters¶ ↑
- e
-
SOAP response.
Calls superclass method
# File lib/softlayer/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(compose_message('soap_error', message: fault_string, code: fault_code )) end end
Private Instance Methods
parse_fault(fault_string)
click to toggle source
# File lib/softlayer/errors/soap_error.rb, line 26 def parse_fault(fault_string) fault_string.lines.first.strip end