google-cloud-dialogflow 1.1.0 → 1.1.1

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: 9b099651cf9d1ad5cd8170c056cc465982d9abea70fa0bdbee16cab4bb8cc7e4
4
- data.tar.gz: f7642c305ed87c34c2539115a9f3163cb0b2028cf837b80dce222c6788fb5317
3
+ metadata.gz: ab854a9d9a51d4c83111c3fd14e1d18f712e08b9a49c15615eb92f20f07a9810
4
+ data.tar.gz: e90b7da9e114cd8c34ee0db5ef86e40392c3e31372d2178c81208709cb198105
5
5
  SHA512:
6
- metadata.gz: 2c2e2e95f2e5b6173eb0e4ffe9a0af50b412191e6fa9605a036f495fc0aa94c584d6e82a1009e93f83ad3ba0171931d698ba991540ccb0e37f1ba562736ee4b2
7
- data.tar.gz: ebe1fa61e4713dd4f0f92f52547335fca7d8bf16cd7f4de50b85a0ba11f874344cebe539b1c4c43c29aee7bf97c0377fbcf7876422bd182e1a23a4b1a38ab842
6
+ metadata.gz: 5f6568676decb68ff17970574dd87994e56e0ec356d97793b260cdeb0267c841fe1e11e10a57cea73ef4f32c7644a494379096351f6dde4be7c1ca187aad2bd6
7
+ data.tar.gz: 8efc802e87f691dda400be90a117203f5f6a48d4035ce4cf2346accf0bdcb0c62594bce76f40b3683c1cd683ebbdc6b382a34fde56cec4d6a061655d3e7325c3
@@ -34,6 +34,10 @@ To summarize:
34
34
  current client retains this method, but improves it with a more powerful
35
35
  interface to match streaming methods in other Ruby clients. See
36
36
  [Streaming Interface](#streaming-interface) for more info.
37
+ * Previously, clients reported RPC errors by raising instances of
38
+ `Google::Gax::GaxError` and its subclasses. Now, RPC exceptions are of type
39
+ `Google::Cloud::Error` and its subclasses. See
40
+ [Handling Errors](#handling-errors) for more info.
37
41
  * Some classes have moved into different namespaces. See
38
42
  [Class Namespaces](#class-namespaces) for more info.
39
43
 
@@ -274,7 +278,7 @@ Finally, in the 1.0 client, you can also use the paths module as a convenience m
274
278
 
275
279
  New:
276
280
  ```
277
- # Bring the session_path method into the current class
281
+ # Bring the path helper methods into the current class
278
282
  include Google::Cloud::Dialogflow::V2::Sessions::Paths
279
283
 
280
284
  def foo
@@ -378,6 +382,50 @@ request_stream.close
378
382
  response_thread.join
379
383
  ```
380
384
 
385
+ ### Handling Errors
386
+
387
+ The client reports standard
388
+ [gRPC error codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)
389
+ by raising exceptions. In older releases, these exceptions were located in the
390
+ `Google::Gax` namespace and were subclasses of the `Google::Gax::GaxError` base
391
+ exception class, defined in the `google-gax` gem. However, these classes were
392
+ different from the standard exceptions (subclasses of `Google::Cloud::Error`)
393
+ thrown by other client libraries such as `google-cloud-storage`.
394
+
395
+ The 1.0 client library now uses the `Google::Cloud::Error` exception hierarchy,
396
+ for consistency across all the Google Cloud client libraries. In general, these
397
+ exceptions have the same name as their counterparts from older releases, but
398
+ are located in the `Google::Cloud` namespace rather than the `Google::Gax`
399
+ namespace.
400
+
401
+ Old:
402
+ ```
403
+ client = Google::Cloud::Dialogflow::Sessions.new
404
+
405
+ session = "projects/my-project/agent/sessions/my-session"
406
+ query = { text: { text: "book a meeting room", language_code: "en-US" } }
407
+
408
+ begin
409
+ response = client.detect_intent session, query
410
+ rescue Google::Gax::Error => e
411
+ # Handle exceptions that subclass Google::Gax::Error
412
+ end
413
+ ```
414
+
415
+ New:
416
+ ```
417
+ client = Google::Cloud::Dialogflow.sessions
418
+
419
+ session = "projects/my-project/agent/sessions/my-session"
420
+ query = { text: { text: "book a meeting room", language_code: "en-US" } }
421
+
422
+ begin
423
+ response = client.detect_intent session: session, query_input: query
424
+ rescue Google::Cloud::Error => e
425
+ # Handle exceptions that subclass Google::Cloud::Error
426
+ end
427
+ ```
428
+
381
429
  ### Class Namespaces
382
430
 
383
431
  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 Dialogflow
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-dialogflow
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