google-cloud-recaptcha_enterprise 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0394877e7c8c6d7808ee1223a8beaeca7857f188d6854286f6d8896cd5c27de5'
4
- data.tar.gz: ec19d700775e50cbbc0f24962418e1d9d9d2dc1d44fccc0b5727a495c8bef8f9
3
+ metadata.gz: 529a2c3f83ac0da8d49de81c465b993abaf41a123e904c82600cd9199f2b8461
4
+ data.tar.gz: 6d7c6c5718797d2addafc75fe4d0db0104d7868d6ab686f389032bed91684484
5
5
  SHA512:
6
- metadata.gz: 8f6f21debace7edec8d5a254414269e9e1899852821ed81b282e9ab9aec5cb2b572288482ddc49bf6ad961e0beca51583c00e5d3af8a54c704bc4e286f4de1b7
7
- data.tar.gz: 73598044e379c525d7b0132af2ca146720abcc1f6cc090e0469c3f3170a10f18397cd920caae85b7dfa377ef03010a0acca40f767616bb837168ce64ad9c507f
6
+ metadata.gz: 0d248b9e234fcc19e32901d8da51bb1fb2a21c28b96202bc09e24b599cdb61e5bb4f1d464f8c1fa6c7204890b63b06cb973687d6b4235f93650d589b0c60e058
7
+ data.tar.gz: 8929d7525af0adbdfba2ead607118a2c726e47cb06dfa2ef6f4716403faba8475e30e016c7dfee840f03f98a5b60c828f21c352976360eb74c268be7d6293b86
@@ -31,6 +31,10 @@ To summarize:
31
31
  resource paths. These methods now take keyword rather than positional
32
32
  arguments, and are also available in a separate paths module. See
33
33
  [Resource Path Helpers](#resource-path-helpers) for more info.
34
+ * Previously, clients reported RPC errors by raising instances of
35
+ `Google::Gax::GaxError` and its subclasses. Now, RPC exceptions are of type
36
+ `Google::Cloud::Error` and its subclasses. See
37
+ [Handling Errors](#handling-errors) for more info.
34
38
  * Some classes have moved into different namespaces. In particular, classes
35
39
  that were under `Google::Cloud::Recaptchaenterprise` were moved under
36
40
  `Google::Cloud::RecaptchaEnterprise`. See
@@ -243,7 +247,7 @@ In the 1.0 client, you can also use the paths module as a convenience module.
243
247
 
244
248
  New:
245
249
  ```
246
- # Bring the session_path method into the current class
250
+ # Bring the path helper methods into the current class
247
251
  include Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Paths
248
252
 
249
253
  def foo
@@ -258,6 +262,48 @@ def foo
258
262
  end
259
263
  ```
260
264
 
265
+ ### Handling Errors
266
+
267
+ The client reports standard
268
+ [gRPC error codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)
269
+ by raising exceptions. In older releases, these exceptions were located in the
270
+ `Google::Gax` namespace and were subclasses of the `Google::Gax::GaxError` base
271
+ exception class, defined in the `google-gax` gem. However, these classes were
272
+ different from the standard exceptions (subclasses of `Google::Cloud::Error`)
273
+ thrown by other client libraries such as `google-cloud-storage`.
274
+
275
+ The 1.0 client library now uses the `Google::Cloud::Error` exception hierarchy,
276
+ for consistency across all the Google Cloud client libraries. In general, these
277
+ exceptions have the same name as their counterparts from older releases, but
278
+ are located in the `Google::Cloud` namespace rather than the `Google::Gax`
279
+ namespace.
280
+
281
+ Old:
282
+ ```
283
+ client = Google::Cloud::RecaptchaEnterprise.new
284
+
285
+ parent = "projects/my-project"
286
+
287
+ begin
288
+ response = client.list_keys parent, page_size: 10
289
+ rescue Google::Gax::Error => e
290
+ # Handle exceptions that subclass Google::Gax::Error
291
+ end
292
+ ```
293
+
294
+ New:
295
+ ```
296
+ client = Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service
297
+
298
+ parent = "projects/my-project"
299
+
300
+ begin
301
+ response = client.list_keys parent: parent, page_size: 10
302
+ rescue Google::Cloud::Error => e
303
+ # Handle exceptions that subclass Google::Cloud::Error
304
+ end
305
+ ```
306
+
261
307
  ### Class Namespaces
262
308
 
263
309
  In older releases, (protobuf) data type classes were located under the module
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module RecaptchaEnterprise
23
- VERSION = "1.1.0"
23
+ VERSION = "1.1.1"
24
24
  end
25
25
  end
26
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-recaptcha_enterprise
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-20 00:00:00.000000000 Z
11
+ date: 2020-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core