Added better handling of errors returned by Splunk in formats other than XML.