zuora_api 1.7.65b → 1.7.65c

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c2cbbb29a43233ab20aa0c0c03ad09170070fa3d46b4fda9ef03cb4ff6d88c3a
4
- data.tar.gz: c4b2c7f25f30ec251b1a2c310b87bb4c60e42a8f6d67362b208420b391fb8bf3
3
+ metadata.gz: 6707b17c4dcf42bc9b1125e2d0cf4060cc92a32f73ada2407d68ac23c3b13c90
4
+ data.tar.gz: 59f9d07a0741f61581d85b5b0354f050f81832276cca1a1f8a6a6f974020fde6
5
5
  SHA512:
6
- metadata.gz: c3a02b7dd3ee4f89503d7058595bda561d3a1753ee76ba6d697d8bbd3d9a56268fd99b6e10f198c30efd74a6592f85bf5d6d2182cc0f9477320fe67e2dcf94f2
7
- data.tar.gz: c269803e8561fc7d787dbe34198331e3a99a2724e945520b68376119af4d69f1da9ada4e4cb725a50f897a4ba479b1b56785adff658b327e716cb89c58c12165
6
+ metadata.gz: aa61a11e859e7a00b82903f2c792a3b9bbe486a24c8774cbe0b049db7ffbf9afe800060c0c41aa782918d3e373f57c45eb0e50143bc7a487c29d5bc09db02458
7
+ data.tar.gz: b6bf8efa26d37b295a1ed4db27809833e3821d03fb62d2cc186c11846b504d6b85591800cd105494820b53ef4a76cd36f1e0187f6c94780c836787dd43190c9e
@@ -534,6 +534,7 @@ module ZuoraAPI
534
534
  Rails.logger.error("SOAP Call - #{ex.class} Timed out will retry after #{timeout_sleep_interval} seconds")
535
535
  end
536
536
  end
537
+ raise ZuoraAPI::Exceptions::ZuoraAPIReadTimeout.new("Received read timeout from #{url}") if ex.is_a?(Net::ReadTimeout)
537
538
  raise ex
538
539
  end
539
540
 
@@ -552,6 +553,7 @@ module ZuoraAPI
552
553
  Rails.logger.error("SOAP Call - #{ex.class} Timed out will retry after #{timeout_sleep_interval} seconds")
553
554
  end
554
555
  end
556
+ raise ZuoraAPI::Exceptions::ZuoraAPIReadTimeout.new("Received read timeout from #{url}") if ex.is_a?(Net::ReadTimeout)
555
557
  raise ex
556
558
  end
557
559
  rescue => ex
@@ -602,7 +604,7 @@ module ZuoraAPI
602
604
  reason = body.xpath('//ns2:StatusReason', 'ns2' => 'http://object.api.zuora.com/').text
603
605
  if reason.present?
604
606
  message = body.xpath('//ns2:StatusReason', 'ns2' => 'http://object.api.zuora.com/').text
605
- error = message.match(/^[\w\d]{16}\: (Unexpected error.|No HTTP Response)/).present? ? 'UNEXPECTED_ERROR' : 'FATAL_ERROR'
607
+ error = message.match(/^[\w\d]{16}\: (Unexpected error.|No HTTP Response|Socket Timeout)/).present? ? 'UNEXPECTED_ERROR' : 'FATAL_ERROR'
606
608
  else
607
609
  error = 'FATAL_ERROR'
608
610
  message = 'Export failed due to unknown reason. Consult api logs.'
@@ -1114,7 +1116,8 @@ module ZuoraAPI
1114
1116
  Rails.logger.error("Rest Call - #{ex.class} Timed out will retry after #{timeout_sleep_interval} seconds")
1115
1117
  end
1116
1118
  end
1117
- raise ex
1119
+ raise ZuoraAPI::Exceptions::ZuoraAPIReadTimeout.new("Received read timeout from #{url}") if ex.is_a?(Net::ReadTimeout)
1120
+ raise ex
1118
1121
  end
1119
1122
 
1120
1123
  tries -= 1
@@ -1132,6 +1135,7 @@ module ZuoraAPI
1132
1135
  Rails.logger.error("Rest Call - #{ex.class} Timed out will retry after #{timeout_sleep_interval} seconds")
1133
1136
  end
1134
1137
  end
1138
+ raise ZuoraAPI::Exceptions::ZuoraAPIReadTimeout.new("Received read timeout from #{url}") if ex.is_a?(Net::ReadTimeout)
1135
1139
  raise ex
1136
1140
  end
1137
1141
  rescue => ex
@@ -1189,6 +1193,8 @@ module ZuoraAPI
1189
1193
  def get_file(url: nil, headers: {}, z_session: true, tempfile: true, output_file_name: nil, zuora_track_id: nil, add_timestamp: true, file_path: defined?(Rails.root.join('tmp')) ? Rails.root.join('tmp') : Pathname.new(Dir.pwd), timeout_retries: 3, timeout: 120, session_type: :basic, **execute_params)
1190
1194
  raise "file_path must be of class Pathname" if file_path.class != Pathname
1191
1195
 
1196
+ retry_count ||= timeout_retries
1197
+
1192
1198
  #Make sure directory exists
1193
1199
  require 'fileutils'
1194
1200
  FileUtils.mkdir_p(file_path) unless File.exists?(file_path)
@@ -1206,7 +1212,6 @@ module ZuoraAPI
1206
1212
  headers['Zuora-Track-Id'] = zuora_track_id if zuora_track_id.present?
1207
1213
 
1208
1214
  response_save = nil
1209
- retry_count ||= timeout_retries
1210
1215
  http.request_get(uri.request_uri, headers) do |response|
1211
1216
  response_save = response
1212
1217
  status_code = response.code if response
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.7.65b"
2
+ VERSION = "1.7.65c"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.65b
4
+ version: 1.7.65c
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zuora Strategic Solutions Group
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-24 00:00:00.000000000 Z
11
+ date: 2020-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler