tags:

views:

81

answers:

1

I can see in the Savon log that my SOAP faults contain XML like this:

<errorCode>666</errorCode><errorDescription>some evil error</errorDescription>

Does anyone know how to parse the error code and description out of the response? Sorry if this is a stupid question, but I've tried everything, and I haven't been able to find any documentation on this.

+1  A: 

For the record, the only way I was able to do this was by disabling Savon exceptions:

Savon::Response.raise_errors = false

After doing this, I had to check response.soap_fault? after each SOAP call to see if there was an error. Then I could access the error details using response.to_hash.

Michael Conigliaro