google-apis-core 0.5.0 → 0.6.0

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: 8b0d661c88385398896b7cca5ae223f6dc366d1f94d73ba016d23c7dc3817a96
4
- data.tar.gz: 50b2726dc4c02d38fe61ec1f44f6b95691eda96b6a7d68ee4a4e4b8eb6e9bf9f
3
+ metadata.gz: a06abcc898df4624c92e688e9a96df1b80a4672b9a1e3ab571fa050510eb7536
4
+ data.tar.gz: d52f59c6503a787921c8dee5dacd5c7420daca2d67ead5cdb36fe70974ab7bf2
5
5
  SHA512:
6
- metadata.gz: 65127d75756ca4211aea26ad7923bdc17dca795e4d39d19c763b9577dcc6a492a6935c278e64b1132de3c26fd903bc0444f1e80e9dd0080f1fc3f15e22cfba65
7
- data.tar.gz: fc7fd5fbd313851c222505fbb68b81094ab94c9eb7e27eb40ab71d6bb39096f0dbeffcf1acad8092412b3fb2f40678bf6a425a0e35914e00af6bdeb21015a0e0
6
+ metadata.gz: 259dfe34f6d13f9f2381b4cf5c3d88a9aaeb46c954df0dd1b5f3c5029896dbef3853b4a76f5b9c3e79b38cff1c1fbb8a3d205c41824cebe9cdc66f8c0098d421
7
+ data.tar.gz: f383d03683daabbade354ec14c1708cefe2f5fd58bdee645e2d173d2fb9c95e2e35828750da8b1afd6449256a11374d953e87251cbc176595436fada8a12850d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 0.6.0 (2022-06-15)
4
+
5
+ #### Features
6
+
7
+ * add few more errors as retriable errors
8
+
3
9
  ### 0.5.0 (2022-05-15)
4
10
 
5
11
  #### Features
@@ -27,7 +27,10 @@ module Google
27
27
  class HttpCommand
28
28
  include Logging
29
29
 
30
- RETRIABLE_ERRORS = [Google::Apis::ServerError, Google::Apis::RateLimitError, Google::Apis::TransmissionError]
30
+ RETRIABLE_ERRORS = [Google::Apis::ServerError,
31
+ Google::Apis::RateLimitError,
32
+ Google::Apis::TransmissionError,
33
+ Google::Apis::RequestTimeOutError]
31
34
 
32
35
  begin
33
36
  require 'opencensus'
@@ -225,6 +228,9 @@ module Google
225
228
  when 429
226
229
  message ||= 'Rate limit exceeded'
227
230
  raise Google::Apis::RateLimitError.new(message, status_code: status, header: header, body: body)
231
+ when 408
232
+ message ||= 'Request time out'
233
+ raise Google::Apis::RequestTimeOutError.new(message, status_code: status, header: header, body: body)
228
234
  when 304, 400, 402...500
229
235
  message ||= 'Invalid request'
230
236
  raise Google::Apis::ClientError.new(message, status_code: status, header: header, body: body)
@@ -278,7 +284,7 @@ module Google
278
284
  rescue Google::Apis::Error => e
279
285
  err = e
280
286
  end
281
- elsif err.is_a?(HTTPClient::TimeoutError) || err.is_a?(SocketError)
287
+ elsif err.is_a?(HTTPClient::TimeoutError) || err.is_a?(SocketError) || err.is_a?(HTTPClient::KeepAliveDisconnected) || err.is_a?(Errno::ECONNREFUSED) || err.is_a?(Errno::ETIMEDOUT)
282
288
  err = Google::Apis::TransmissionError.new(err)
283
289
  end
284
290
  block.call(nil, err) if block_given?
@@ -16,7 +16,7 @@ module Google
16
16
  module Apis
17
17
  module Core
18
18
  # Core version
19
- VERSION = "0.5.0".freeze
19
+ VERSION = "0.6.0".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -66,7 +66,11 @@ module Google
66
66
  class ClientError < Error
67
67
  end
68
68
 
69
- # A 4xx class HTTP error occurred.
69
+ # A 408 HTTP error occurred.
70
+ class RequestTimeOutError < ClientError
71
+ end
72
+
73
+ # A 429 HTTP error occurred.
70
74
  class RateLimitError < Error
71
75
  end
72
76
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-16 00:00:00.000000000 Z
11
+ date: 2022-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: representable
@@ -184,7 +184,7 @@ licenses:
184
184
  metadata:
185
185
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
186
186
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/google-apis-core/CHANGELOG.md
187
- documentation_uri: https://googleapis.dev/ruby/google-apis-core/v0.5.0
187
+ documentation_uri: https://googleapis.dev/ruby/google-apis-core/v0.6.0
188
188
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/google-apis-core
189
189
  post_install_message:
190
190
  rdoc_options: []
@@ -201,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
201
  - !ruby/object:Gem::Version
202
202
  version: '0'
203
203
  requirements: []
204
- rubygems_version: 3.3.5
204
+ rubygems_version: 3.3.14
205
205
  signing_key:
206
206
  specification_version: 4
207
207
  summary: Common utility and base classes for legacy Google REST clients