vpulim/node-soap — pull request #273 by ankush-garg (2014-02-28 23:42:27+00:00)
Title: Attach root object to error on soap fault.

When a soap fault happens then xmlToObject function in wsdl.js creates and throws an error from the soap faultcode, faultdetail, etc. However, the json representation of the soap response is lost during this process. Raw xml response is returned by client.js on line 157 in such cases but its not ideal as it will again need to be converted to json.

The pull request attached the root object to the thrown error so that it can be retrieved later for further processing. A test has also been added for the same. Please review and merge.