lib/soaspec/exchange_handlers/response_extractor.rb in soaspec-0.3.2 vs lib/soaspec/exchange_handlers/response_extractor.rb in soaspec-0.3.3
- old
+ new
@@ -14,12 +14,12 @@
when :json
converted = JSON.parse(response.body)
return converted.transform_keys_to_symbols if converted.is_a? Hash
return converted.map!(&:transform_keys_to_symbols) if converted.is_a? Array
- raise 'Incorrect Type produced ' + converted.class
+ raise Soaspec::ResponseError, 'Incorrect Type produced ' + converted.class
else
- raise "Neither XML nor JSON detected. It is #{type}. Don't know how to parse It is #{response.body}"
+ raise Soaspec::ResponseError, "Neither XML nor JSON detected. It is #{type}. Don't know how to parse It is #{response.body}"
end
end
# @param [Object] response Response object
# @return [Hash] Hash representing response body