google-cloud-telco_automation-v1 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -162,15 +162,27 @@ module Google
162
162
  endpoint: @config.endpoint,
163
163
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
164
164
  universe_domain: @config.universe_domain,
165
- credentials: credentials
165
+ credentials: credentials,
166
+ logger: @config.logger
166
167
  )
167
168
 
169
+ @telco_automation_stub.logger(stub: true)&.info do |entry|
170
+ entry.set_system_name
171
+ entry.set_service
172
+ entry.message = "Created client for #{entry.service}"
173
+ entry.set_credentials_fields credentials
174
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
175
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
176
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
177
+ end
178
+
168
179
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
169
180
  config.credentials = credentials
170
181
  config.quota_project = @quota_project_id
171
182
  config.endpoint = @telco_automation_stub.endpoint
172
183
  config.universe_domain = @telco_automation_stub.universe_domain
173
184
  config.bindings_override = @config.bindings_override
185
+ config.logger = @telco_automation_stub.logger if config.respond_to? :logger=
174
186
  end
175
187
  end
176
188
 
@@ -188,6 +200,15 @@ module Google
188
200
  #
189
201
  attr_reader :location_client
190
202
 
203
+ ##
204
+ # The logger used for request/response debug logging.
205
+ #
206
+ # @return [Logger]
207
+ #
208
+ def logger
209
+ @telco_automation_stub.logger
210
+ end
211
+
191
212
  # Service calls
192
213
 
193
214
  ##
@@ -276,7 +297,6 @@ module Google
276
297
 
277
298
  @telco_automation_stub.list_orchestration_clusters request, options do |result, operation|
278
299
  yield result, operation if block_given?
279
- return result
280
300
  end
281
301
  rescue ::Gapic::Rest::Error => e
282
302
  raise ::Google::Cloud::Error.from_error(e)
@@ -355,7 +375,6 @@ module Google
355
375
 
356
376
  @telco_automation_stub.get_orchestration_cluster request, options do |result, operation|
357
377
  yield result, operation if block_given?
358
- return result
359
378
  end
360
379
  rescue ::Gapic::Rest::Error => e
361
380
  raise ::Google::Cloud::Error.from_error(e)
@@ -462,7 +481,7 @@ module Google
462
481
  @telco_automation_stub.create_orchestration_cluster request, options do |result, operation|
463
482
  result = ::Gapic::Operation.new result, @operations_client, options: options
464
483
  yield result, operation if block_given?
465
- return result
484
+ throw :response, result
466
485
  end
467
486
  rescue ::Gapic::Rest::Error => e
468
487
  raise ::Google::Cloud::Error.from_error(e)
@@ -563,7 +582,7 @@ module Google
563
582
  @telco_automation_stub.delete_orchestration_cluster request, options do |result, operation|
564
583
  result = ::Gapic::Operation.new result, @operations_client, options: options
565
584
  yield result, operation if block_given?
566
- return result
585
+ throw :response, result
567
586
  end
568
587
  rescue ::Gapic::Rest::Error => e
569
588
  raise ::Google::Cloud::Error.from_error(e)
@@ -655,7 +674,6 @@ module Google
655
674
 
656
675
  @telco_automation_stub.list_edge_slms request, options do |result, operation|
657
676
  yield result, operation if block_given?
658
- return result
659
677
  end
660
678
  rescue ::Gapic::Rest::Error => e
661
679
  raise ::Google::Cloud::Error.from_error(e)
@@ -734,7 +752,6 @@ module Google
734
752
 
735
753
  @telco_automation_stub.get_edge_slm request, options do |result, operation|
736
754
  yield result, operation if block_given?
737
- return result
738
755
  end
739
756
  rescue ::Gapic::Rest::Error => e
740
757
  raise ::Google::Cloud::Error.from_error(e)
@@ -841,7 +858,7 @@ module Google
841
858
  @telco_automation_stub.create_edge_slm request, options do |result, operation|
842
859
  result = ::Gapic::Operation.new result, @operations_client, options: options
843
860
  yield result, operation if block_given?
844
- return result
861
+ throw :response, result
845
862
  end
846
863
  rescue ::Gapic::Rest::Error => e
847
864
  raise ::Google::Cloud::Error.from_error(e)
@@ -942,7 +959,7 @@ module Google
942
959
  @telco_automation_stub.delete_edge_slm request, options do |result, operation|
943
960
  result = ::Gapic::Operation.new result, @operations_client, options: options
944
961
  yield result, operation if block_given?
945
- return result
962
+ throw :response, result
946
963
  end
947
964
  rescue ::Gapic::Rest::Error => e
948
965
  raise ::Google::Cloud::Error.from_error(e)
@@ -1027,7 +1044,6 @@ module Google
1027
1044
 
1028
1045
  @telco_automation_stub.create_blueprint request, options do |result, operation|
1029
1046
  yield result, operation if block_given?
1030
- return result
1031
1047
  end
1032
1048
  rescue ::Gapic::Rest::Error => e
1033
1049
  raise ::Google::Cloud::Error.from_error(e)
@@ -1109,7 +1125,6 @@ module Google
1109
1125
 
1110
1126
  @telco_automation_stub.update_blueprint request, options do |result, operation|
1111
1127
  yield result, operation if block_given?
1112
- return result
1113
1128
  end
1114
1129
  rescue ::Gapic::Rest::Error => e
1115
1130
  raise ::Google::Cloud::Error.from_error(e)
@@ -1195,7 +1210,6 @@ module Google
1195
1210
 
1196
1211
  @telco_automation_stub.get_blueprint request, options do |result, operation|
1197
1212
  yield result, operation if block_given?
1198
- return result
1199
1213
  end
1200
1214
  rescue ::Gapic::Rest::Error => e
1201
1215
  raise ::Google::Cloud::Error.from_error(e)
@@ -1277,7 +1291,6 @@ module Google
1277
1291
 
1278
1292
  @telco_automation_stub.delete_blueprint request, options do |result, operation|
1279
1293
  yield result, operation if block_given?
1280
- return result
1281
1294
  end
1282
1295
  rescue ::Gapic::Rest::Error => e
1283
1296
  raise ::Google::Cloud::Error.from_error(e)
@@ -1372,7 +1385,7 @@ module Google
1372
1385
  @telco_automation_stub.list_blueprints request, options do |result, operation|
1373
1386
  result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_blueprints, "blueprints", request, result, options
1374
1387
  yield result, operation if block_given?
1375
- return result
1388
+ throw :response, result
1376
1389
  end
1377
1390
  rescue ::Gapic::Rest::Error => e
1378
1391
  raise ::Google::Cloud::Error.from_error(e)
@@ -1452,7 +1465,6 @@ module Google
1452
1465
 
1453
1466
  @telco_automation_stub.approve_blueprint request, options do |result, operation|
1454
1467
  yield result, operation if block_given?
1455
- return result
1456
1468
  end
1457
1469
  rescue ::Gapic::Rest::Error => e
1458
1470
  raise ::Google::Cloud::Error.from_error(e)
@@ -1531,7 +1543,6 @@ module Google
1531
1543
 
1532
1544
  @telco_automation_stub.propose_blueprint request, options do |result, operation|
1533
1545
  yield result, operation if block_given?
1534
- return result
1535
1546
  end
1536
1547
  rescue ::Gapic::Rest::Error => e
1537
1548
  raise ::Google::Cloud::Error.from_error(e)
@@ -1610,7 +1621,6 @@ module Google
1610
1621
 
1611
1622
  @telco_automation_stub.reject_blueprint request, options do |result, operation|
1612
1623
  yield result, operation if block_given?
1613
- return result
1614
1624
  end
1615
1625
  rescue ::Gapic::Rest::Error => e
1616
1626
  raise ::Google::Cloud::Error.from_error(e)
@@ -1699,7 +1709,7 @@ module Google
1699
1709
  @telco_automation_stub.list_blueprint_revisions request, options do |result, operation|
1700
1710
  result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_blueprint_revisions, "blueprints", request, result, options
1701
1711
  yield result, operation if block_given?
1702
- return result
1712
+ throw :response, result
1703
1713
  end
1704
1714
  rescue ::Gapic::Rest::Error => e
1705
1715
  raise ::Google::Cloud::Error.from_error(e)
@@ -1799,7 +1809,7 @@ module Google
1799
1809
  @telco_automation_stub.search_blueprint_revisions request, options do |result, operation|
1800
1810
  result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :search_blueprint_revisions, "blueprints", request, result, options
1801
1811
  yield result, operation if block_given?
1802
- return result
1812
+ throw :response, result
1803
1813
  end
1804
1814
  rescue ::Gapic::Rest::Error => e
1805
1815
  raise ::Google::Cloud::Error.from_error(e)
@@ -1900,7 +1910,7 @@ module Google
1900
1910
  @telco_automation_stub.search_deployment_revisions request, options do |result, operation|
1901
1911
  result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :search_deployment_revisions, "deployments", request, result, options
1902
1912
  yield result, operation if block_given?
1903
- return result
1913
+ throw :response, result
1904
1914
  end
1905
1915
  rescue ::Gapic::Rest::Error => e
1906
1916
  raise ::Google::Cloud::Error.from_error(e)
@@ -1981,7 +1991,6 @@ module Google
1981
1991
 
1982
1992
  @telco_automation_stub.discard_blueprint_changes request, options do |result, operation|
1983
1993
  yield result, operation if block_given?
1984
- return result
1985
1994
  end
1986
1995
  rescue ::Gapic::Rest::Error => e
1987
1996
  raise ::Google::Cloud::Error.from_error(e)
@@ -2073,7 +2082,7 @@ module Google
2073
2082
  @telco_automation_stub.list_public_blueprints request, options do |result, operation|
2074
2083
  result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_public_blueprints, "public_blueprints", request, result, options
2075
2084
  yield result, operation if block_given?
2076
- return result
2085
+ throw :response, result
2077
2086
  end
2078
2087
  rescue ::Gapic::Rest::Error => e
2079
2088
  raise ::Google::Cloud::Error.from_error(e)
@@ -2152,7 +2161,6 @@ module Google
2152
2161
 
2153
2162
  @telco_automation_stub.get_public_blueprint request, options do |result, operation|
2154
2163
  yield result, operation if block_given?
2155
- return result
2156
2164
  end
2157
2165
  rescue ::Gapic::Rest::Error => e
2158
2166
  raise ::Google::Cloud::Error.from_error(e)
@@ -2237,7 +2245,6 @@ module Google
2237
2245
 
2238
2246
  @telco_automation_stub.create_deployment request, options do |result, operation|
2239
2247
  yield result, operation if block_given?
2240
- return result
2241
2248
  end
2242
2249
  rescue ::Gapic::Rest::Error => e
2243
2250
  raise ::Google::Cloud::Error.from_error(e)
@@ -2319,7 +2326,6 @@ module Google
2319
2326
 
2320
2327
  @telco_automation_stub.update_deployment request, options do |result, operation|
2321
2328
  yield result, operation if block_given?
2322
- return result
2323
2329
  end
2324
2330
  rescue ::Gapic::Rest::Error => e
2325
2331
  raise ::Google::Cloud::Error.from_error(e)
@@ -2406,7 +2412,6 @@ module Google
2406
2412
 
2407
2413
  @telco_automation_stub.get_deployment request, options do |result, operation|
2408
2414
  yield result, operation if block_given?
2409
- return result
2410
2415
  end
2411
2416
  rescue ::Gapic::Rest::Error => e
2412
2417
  raise ::Google::Cloud::Error.from_error(e)
@@ -2486,7 +2491,6 @@ module Google
2486
2491
 
2487
2492
  @telco_automation_stub.remove_deployment request, options do |result, operation|
2488
2493
  yield result, operation if block_given?
2489
- return result
2490
2494
  end
2491
2495
  rescue ::Gapic::Rest::Error => e
2492
2496
  raise ::Google::Cloud::Error.from_error(e)
@@ -2581,7 +2585,7 @@ module Google
2581
2585
  @telco_automation_stub.list_deployments request, options do |result, operation|
2582
2586
  result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_deployments, "deployments", request, result, options
2583
2587
  yield result, operation if block_given?
2584
- return result
2588
+ throw :response, result
2585
2589
  end
2586
2590
  rescue ::Gapic::Rest::Error => e
2587
2591
  raise ::Google::Cloud::Error.from_error(e)
@@ -2670,7 +2674,7 @@ module Google
2670
2674
  @telco_automation_stub.list_deployment_revisions request, options do |result, operation|
2671
2675
  result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_deployment_revisions, "deployments", request, result, options
2672
2676
  yield result, operation if block_given?
2673
- return result
2677
+ throw :response, result
2674
2678
  end
2675
2679
  rescue ::Gapic::Rest::Error => e
2676
2680
  raise ::Google::Cloud::Error.from_error(e)
@@ -2751,7 +2755,6 @@ module Google
2751
2755
 
2752
2756
  @telco_automation_stub.discard_deployment_changes request, options do |result, operation|
2753
2757
  yield result, operation if block_given?
2754
- return result
2755
2758
  end
2756
2759
  rescue ::Gapic::Rest::Error => e
2757
2760
  raise ::Google::Cloud::Error.from_error(e)
@@ -2830,7 +2833,6 @@ module Google
2830
2833
 
2831
2834
  @telco_automation_stub.apply_deployment request, options do |result, operation|
2832
2835
  yield result, operation if block_given?
2833
- return result
2834
2836
  end
2835
2837
  rescue ::Gapic::Rest::Error => e
2836
2838
  raise ::Google::Cloud::Error.from_error(e)
@@ -2909,7 +2911,6 @@ module Google
2909
2911
 
2910
2912
  @telco_automation_stub.compute_deployment_status request, options do |result, operation|
2911
2913
  yield result, operation if block_given?
2912
- return result
2913
2914
  end
2914
2915
  rescue ::Gapic::Rest::Error => e
2915
2916
  raise ::Google::Cloud::Error.from_error(e)
@@ -2991,7 +2992,6 @@ module Google
2991
2992
 
2992
2993
  @telco_automation_stub.rollback_deployment request, options do |result, operation|
2993
2994
  yield result, operation if block_given?
2994
- return result
2995
2995
  end
2996
2996
  rescue ::Gapic::Rest::Error => e
2997
2997
  raise ::Google::Cloud::Error.from_error(e)
@@ -3070,7 +3070,6 @@ module Google
3070
3070
 
3071
3071
  @telco_automation_stub.get_hydrated_deployment request, options do |result, operation|
3072
3072
  yield result, operation if block_given?
3073
- return result
3074
3073
  end
3075
3074
  rescue ::Gapic::Rest::Error => e
3076
3075
  raise ::Google::Cloud::Error.from_error(e)
@@ -3162,7 +3161,7 @@ module Google
3162
3161
  @telco_automation_stub.list_hydrated_deployments request, options do |result, operation|
3163
3162
  result = ::Gapic::Rest::PagedEnumerable.new @telco_automation_stub, :list_hydrated_deployments, "hydrated_deployments", request, result, options
3164
3163
  yield result, operation if block_given?
3165
- return result
3164
+ throw :response, result
3166
3165
  end
3167
3166
  rescue ::Gapic::Rest::Error => e
3168
3167
  raise ::Google::Cloud::Error.from_error(e)
@@ -3244,7 +3243,6 @@ module Google
3244
3243
 
3245
3244
  @telco_automation_stub.update_hydrated_deployment request, options do |result, operation|
3246
3245
  yield result, operation if block_given?
3247
- return result
3248
3246
  end
3249
3247
  rescue ::Gapic::Rest::Error => e
3250
3248
  raise ::Google::Cloud::Error.from_error(e)
@@ -3323,7 +3321,6 @@ module Google
3323
3321
 
3324
3322
  @telco_automation_stub.apply_hydrated_deployment request, options do |result, operation|
3325
3323
  yield result, operation if block_given?
3326
- return result
3327
3324
  end
3328
3325
  rescue ::Gapic::Rest::Error => e
3329
3326
  raise ::Google::Cloud::Error.from_error(e)
@@ -3403,6 +3400,11 @@ module Google
3403
3400
  # default endpoint URL. The default value of nil uses the environment
3404
3401
  # universe (usually the default "googleapis.com" universe).
3405
3402
  # @return [::String,nil]
3403
+ # @!attribute [rw] logger
3404
+ # A custom logger to use for request/response debug logging, or the value
3405
+ # `:default` (the default) to construct a default logger, or `nil` to
3406
+ # explicitly disable logging.
3407
+ # @return [::Logger,:default,nil]
3406
3408
  #
3407
3409
  class Configuration
3408
3410
  extend ::Gapic::Config
@@ -3431,6 +3433,7 @@ module Google
3431
3433
  # by the host service.
3432
3434
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
3433
3435
  config_attr :bindings_override, {}, ::Hash, nil
3436
+ config_attr :logger, :default, ::Logger, nil, :default
3434
3437
 
3435
3438
  # @private
3436
3439
  def initialize parent_config = nil
@@ -115,14 +115,6 @@ module Google
115
115
  # Lists operations that match the specified filter in the request. If the
116
116
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
117
117
  #
118
- # NOTE: the `name` binding allows API services to override the binding
119
- # to use different resource name schemes, such as `users/*/operations`. To
120
- # override the binding, API services can add a binding such as
121
- # `"/v1/{name=users/*}/operations"` to their service configuration.
122
- # For backwards compatibility, the default name includes the operations
123
- # collection id, however overriding users must ensure the name binding
124
- # is the parent resource, without the operations collection id.
125
- #
126
118
  # @overload list_operations(request, options = nil)
127
119
  # Pass arguments to `list_operations` via a request object, either of type
128
120
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -204,7 +196,7 @@ module Google
204
196
  @operations_stub.list_operations request, options do |result, operation|
205
197
  result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
206
198
  yield result, operation if block_given?
207
- return result
199
+ throw :response, result
208
200
  end
209
201
  rescue ::Gapic::Rest::Error => e
210
202
  raise ::Google::Cloud::Error.from_error(e)
@@ -293,7 +285,7 @@ module Google
293
285
  @operations_stub.get_operation request, options do |result, operation|
294
286
  result = ::Gapic::Operation.new result, @operations_client, options: options
295
287
  yield result, operation if block_given?
296
- return result
288
+ throw :response, result
297
289
  end
298
290
  rescue ::Gapic::Rest::Error => e
299
291
  raise ::Google::Cloud::Error.from_error(e)
@@ -375,7 +367,6 @@ module Google
375
367
 
376
368
  @operations_stub.delete_operation request, options do |result, operation|
377
369
  yield result, operation if block_given?
378
- return result
379
370
  end
380
371
  rescue ::Gapic::Rest::Error => e
381
372
  raise ::Google::Cloud::Error.from_error(e)
@@ -390,8 +381,9 @@ module Google
390
381
  # other methods to check whether the cancellation succeeded or whether the
391
382
  # operation completed despite cancellation. On successful cancellation,
392
383
  # the operation is not deleted; instead, it becomes an operation with
393
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
394
- # corresponding to `Code.CANCELLED`.
384
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a
385
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
386
+ # `Code.CANCELLED`.
395
387
  #
396
388
  # @overload cancel_operation(request, options = nil)
397
389
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -463,7 +455,6 @@ module Google
463
455
 
464
456
  @operations_stub.cancel_operation request, options do |result, operation|
465
457
  yield result, operation if block_given?
466
- return result
467
458
  end
468
459
  rescue ::Gapic::Rest::Error => e
469
460
  raise ::Google::Cloud::Error.from_error(e)
@@ -543,6 +534,11 @@ module Google
543
534
  # default endpoint URL. The default value of nil uses the environment
544
535
  # universe (usually the default "googleapis.com" universe).
545
536
  # @return [::String,nil]
537
+ # @!attribute [rw] logger
538
+ # A custom logger to use for request/response debug logging, or the value
539
+ # `:default` (the default) to construct a default logger, or `nil` to
540
+ # explicitly disable logging.
541
+ # @return [::Logger,:default,nil]
546
542
  #
547
543
  class Configuration
548
544
  extend ::Gapic::Config
@@ -564,6 +560,7 @@ module Google
564
560
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
565
561
  config_attr :quota_project, nil, ::String, nil
566
562
  config_attr :universe_domain, nil, ::String, nil
563
+ config_attr :logger, :default, ::Logger, nil, :default
567
564
 
568
565
  # @private
569
566
  def initialize parent_config = nil
@@ -683,16 +680,18 @@ module Google
683
680
 
684
681
  response = @client_stub.make_http_request(
685
682
  verb,
686
- uri: uri,
687
- body: body || "",
688
- params: query_string_params,
683
+ uri: uri,
684
+ body: body || "",
685
+ params: query_string_params,
686
+ method_name: "list_operations",
689
687
  options: options
690
688
  )
691
689
  operation = ::Gapic::Rest::TransportOperation.new response
692
690
  result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
693
-
694
- yield result, operation if block_given?
695
- result
691
+ catch :response do
692
+ yield result, operation if block_given?
693
+ result
694
+ end
696
695
  end
697
696
 
698
697
  ##
@@ -721,16 +720,18 @@ module Google
721
720
 
722
721
  response = @client_stub.make_http_request(
723
722
  verb,
724
- uri: uri,
725
- body: body || "",
726
- params: query_string_params,
723
+ uri: uri,
724
+ body: body || "",
725
+ params: query_string_params,
726
+ method_name: "get_operation",
727
727
  options: options
728
728
  )
729
729
  operation = ::Gapic::Rest::TransportOperation.new response
730
730
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
731
-
732
- yield result, operation if block_given?
733
- result
731
+ catch :response do
732
+ yield result, operation if block_given?
733
+ result
734
+ end
734
735
  end
735
736
 
736
737
  ##
@@ -759,16 +760,18 @@ module Google
759
760
 
760
761
  response = @client_stub.make_http_request(
761
762
  verb,
762
- uri: uri,
763
- body: body || "",
764
- params: query_string_params,
763
+ uri: uri,
764
+ body: body || "",
765
+ params: query_string_params,
766
+ method_name: "delete_operation",
765
767
  options: options
766
768
  )
767
769
  operation = ::Gapic::Rest::TransportOperation.new response
768
770
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
769
-
770
- yield result, operation if block_given?
771
- result
771
+ catch :response do
772
+ yield result, operation if block_given?
773
+ result
774
+ end
772
775
  end
773
776
 
774
777
  ##
@@ -797,16 +800,18 @@ module Google
797
800
 
798
801
  response = @client_stub.make_http_request(
799
802
  verb,
800
- uri: uri,
801
- body: body || "",
802
- params: query_string_params,
803
+ uri: uri,
804
+ body: body || "",
805
+ params: query_string_params,
806
+ method_name: "cancel_operation",
803
807
  options: options
804
808
  )
805
809
  operation = ::Gapic::Rest::TransportOperation.new response
806
810
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
807
-
808
- yield result, operation if block_given?
809
- result
811
+ catch :response do
812
+ yield result, operation if block_given?
813
+ result
814
+ end
810
815
  end
811
816
 
812
817
  ##