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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/google/apis/core/http_command.rb +8 -2
- data/lib/google/apis/core/version.rb +1 -1
- data/lib/google/apis/errors.rb +5 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a06abcc898df4624c92e688e9a96df1b80a4672b9a1e3ab571fa050510eb7536
|
4
|
+
data.tar.gz: d52f59c6503a787921c8dee5dacd5c7420daca2d67ead5cdb36fe70974ab7bf2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 259dfe34f6d13f9f2381b4cf5c3d88a9aaeb46c954df0dd1b5f3c5029896dbef3853b4a76f5b9c3e79b38cff1c1fbb8a3d205c41824cebe9cdc66f8c0098d421
|
7
|
+
data.tar.gz: f383d03683daabbade354ec14c1708cefe2f5fd58bdee645e2d173d2fb9c95e2e35828750da8b1afd6449256a11374d953e87251cbc176595436fada8a12850d
|
data/CHANGELOG.md
CHANGED
@@ -27,7 +27,10 @@ module Google
|
|
27
27
|
class HttpCommand
|
28
28
|
include Logging
|
29
29
|
|
30
|
-
RETRIABLE_ERRORS = [Google::Apis::ServerError,
|
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?
|
data/lib/google/apis/errors.rb
CHANGED
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.
|
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-
|
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.
|
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.
|
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
|