diff --git a/Ruby/lib/kount/client.rb b/Ruby/lib/kount/client.rb index 3996d46..ab57161 100644 --- a/Ruby/lib/kount/client.rb +++ b/Ruby/lib/kount/client.rb @@ -61,10 +61,12 @@ def initialize(params = {}) # @return [Hash] RIS response formatted into a native hash def get_response(request) params = prepare_request_params(request) - response = RestClient::Resource.new( - endpoint, - verify_ssl: verify_ssl_option).post params, x_kount_api_key: key + response = {} begin + response = RestClient::Resource.new( + endpoint, + verify_ssl: verify_ssl_option, timeout: 1).post params, x_kount_api_key: key + JSON.parse(response) rescue # RIS errors do not come back as JSON, so just pass them along raw.