google-cloud-asset 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: 6c47b2af1ff8e09d458756ba7671c20c44f9a9250ed4eda8dfc046765e44d7b5
4
- data.tar.gz: 1c30885f81a6bd43d99203940b82ea4d8d496884b763125c30f97c31aed70529
3
+ metadata.gz: 34d3de272e4b74abfe7fcc12d2a157657828005b27bbb8897d723d355d59497b
4
+ data.tar.gz: 60eab44d18f74fcf78c3b2a61eb684ac2af55b2b24f5e017fe72581dbd4d988c
5
5
  SHA512:
6
- metadata.gz: 854452c929ba70329107c19106e8f8f917f236f1abe9aaaaedd617a15ed9c42c258cce099cd8611e9d636070f8d52ef7b7e60a2bf54fe58e10e7c334f146a549
7
- data.tar.gz: 8d34a322dcb1e9ba770dd9d27cbff19eb8fe1b43b910a5bf6d371bfb4bb68b7d6ab960252bb0a6adfc48695abc3aeb407a393bd06c9eb0e1439348158ec7a086
6
+ metadata.gz: 60bc8fdfab9eff4720780f94ba0cc8654a289463a72cd530d2c3e530a8270ae69e962f17f6d223519201d0840ed4277838e25fad34e818d593b27e1a1044aab5
7
+ data.tar.gz: c1d2eb7279e6d5a564719f1bf3858258bab9bff6dafcd6b41e09562f1b7dc386a70b966acf026de52b6f7a17758c2eae7a776919fcd80156636a81cae13d0c82
@@ -29,6 +29,10 @@ To summarize:
29
29
  resource paths. These paths are now instance methods on the client objects,
30
30
  and are also available in a separate paths module. See
31
31
  [Resource Path Helpers](#resource-path-helpers) for more info.
32
+ * Previously, clients reported RPC errors by raising instances of
33
+ `Google::Gax::GaxError` and its subclasses. Now, RPC exceptions are of type
34
+ `Google::Cloud::Error` and its subclasses. See
35
+ [Handling Errors](#handling-errors) for more info.
32
36
  * Some classes have moved into different namespaces. See
33
37
  [Class Namespaces](#class-namespaces) for more info.
34
38
 
@@ -254,7 +258,7 @@ Finally, in the 1.0 client, you can also use the paths module as a convenience m
254
258
 
255
259
  New:
256
260
  ```
257
- # Bring the session_path method into the current class
261
+ # Bring the path helper methods into the current class
258
262
  include Google::Cloud::Asset::V1::AssetService::Paths
259
263
 
260
264
  def foo
@@ -269,6 +273,48 @@ def foo
269
273
  end
270
274
  ```
271
275
 
276
+ ### Handling Errors
277
+
278
+ The client reports standard
279
+ [gRPC error codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)
280
+ by raising exceptions. In older releases, these exceptions were located in the
281
+ `Google::Gax` namespace and were subclasses of the `Google::Gax::GaxError` base
282
+ exception class, defined in the `google-gax` gem. However, these classes were
283
+ different from the standard exceptions (subclasses of `Google::Cloud::Error`)
284
+ thrown by other client libraries such as `google-cloud-storage`.
285
+
286
+ The 1.0 client library now uses the `Google::Cloud::Error` exception hierarchy
287
+ for consistency across all the Google Cloud client libraries. In general, these
288
+ exceptions have the same name as their counterparts from older releases, but
289
+ are located in the `Google::Cloud` namespace rather than the `Google::Gax`
290
+ namespace.
291
+
292
+ Old:
293
+ ```
294
+ client = Google::Cloud::Asset.new
295
+
296
+ name = "projects/my-project/feeds/my-feed"
297
+
298
+ begin
299
+ client.get_feed name
300
+ rescue Google::Gax::Error => e
301
+ # Handle exceptions that subclass Google::Gax::Error
302
+ end
303
+ ```
304
+
305
+ New:
306
+ ```
307
+ client = Google::Cloud::Asset.asset_service
308
+
309
+ name = "projects/my-project/feeds/my-feed"
310
+
311
+ begin
312
+ client.get_feed name: name
313
+ rescue Google::Cloud::Error => e
314
+ # Handle exceptions that subclass Google::Cloud::Error
315
+ end
316
+ ```
317
+
272
318
  ### Class Namespaces
273
319
 
274
320
  In older releases, the client object was of classes with names like:
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Asset
19
- VERSION = "1.1.0".freeze
19
+ VERSION = "1.1.1".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-asset
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