lib/google/cloud/compute/v1/license_codes/rest/client.rb in google-cloud-compute-v1-1.7.0 vs lib/google/cloud/compute/v1/license_codes/rest/client.rb in google-cloud-compute-v1-1.7.1

- old
+ new

@@ -189,12 +189,15 @@ @license_codes_stub.get request, options do |result, response| yield result, response if block_given? return result end rescue ::Faraday::Error => e - gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e - raise ::Google::Cloud::Error.from_error(gapic_error) + begin + raise ::Gapic::Rest::Error.wrap_faraday_error e + rescue ::Gapic::Rest::Error => gapic_error + raise ::Google::Cloud::Error.from_error gapic_error + end end ## # Returns permissions that a caller has on the specified resource. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. # @@ -254,11 +257,14 @@ @license_codes_stub.test_iam_permissions request, options do |result, response| yield result, response if block_given? return result end rescue ::Faraday::Error => e - gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e - raise ::Google::Cloud::Error.from_error(gapic_error) + begin + raise ::Gapic::Rest::Error.wrap_faraday_error e + rescue ::Gapic::Rest::Error => gapic_error + raise ::Google::Cloud::Error.from_error gapic_error + end end ## # Configuration class for the LicenseCodes REST API. #