{"action":"closed","issue":{"url":"https://api.github.com/repos/savonrb/savon/issues/695","labels_url":"https://api.github.com/repos/savonrb/savon/issues/695/labels{/name}","comments_url":"https://api.github.com/repos/savonrb/savon/issues/695/comments","events_url":"https://api.github.com/repos/savonrb/savon/issues/695/events","html_url":"https://github.com/savonrb/savon/issues/695","id":84628790,"number":695,"title":"Custom SOAP Fault parser","user":{"login":"maxdidato","id":2891865,"avatar_url":"https://avatars.githubusercontent.com/u/2891865?v=3","gravatar_id":"","url":"https://api.github.com/users/maxdidato","html_url":"https://github.com/maxdidato","followers_url":"https://api.github.com/users/maxdidato/followers","following_url":"https://api.github.com/users/maxdidato/following{/other_user}","gists_url":"https://api.github.com/users/maxdidato/gists{/gist_id}","starred_url":"https://api.github.com/users/maxdidato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxdidato/subscriptions","organizations_url":"https://api.github.com/users/maxdidato/orgs","repos_url":"https://api.github.com/users/maxdidato/repos","events_url":"https://api.github.com/users/maxdidato/events{/privacy}","received_events_url":"https://api.github.com/users/maxdidato/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-03T15:42:51Z","updated_at":"2015-06-03T15:48:16Z","closed_at":"2015-06-03T15:48:16Z","body":"Savon automatically detects a SOAP Fault and raise a SOAPFault exception using the content of the node \"faultcode\" and \"faultstring\" to generate the message.\r\nIn the project I am currently working on the detailed information about the error are included in the \"detail\" node \r\ne.g.\r\n<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\r\n   <soap:Body>\r\n      <soap:Fault>\r\n         <faultcode>soap:Client</faultcode>\r\n         <faultstring>For input string: \"D\"</faultstring>\r\n         <detail>\r\n            <Exception xmlns=\"\">\r\n               <errorCode>INPUT_VALIDATION_ERROR</errorCode>\r\n               <message>The input string 'd' is not allowed</message>\r\n            </Exception>\r\n         </detail>\r\n      </soap:Fault>\r\n   </soap:Body>\r\n</soap:Envelope>\r\n\r\nI wrote a refinement that compose the Exception message using the information contained in the nodes \"errorCode\" and \"message\"\r\n\r\nIt would be nice to set a custom path ,starting from the Fault node,in the xml response to find the code and the string, something like\r\nSavon.client do \r\n   soap_fault ({code: \"detail.errorCode\", message: \"detail.message\"})\r\nend\r\n"}}