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

- old
+ new

@@ -229,12 +229,15 @@ result = ::Gapic::Rest::PagedEnumerable.new @target_http_proxies_stub, :aggregated_list, "items", request, result, options 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 ## # Deletes the specified TargetHttpProxy resource. # @@ -302,12 +305,15 @@ ) 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 the specified TargetHttpProxy resource. Gets a list of available target HTTP proxies by making a list() request. # @@ -365,12 +371,15 @@ @target_http_proxies_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 ## # Creates a TargetHttpProxy resource in the specified project using the data included in the request. # @@ -438,12 +447,15 @@ ) 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 ## # Retrieves the list of TargetHttpProxy resources available to the specified project. # @@ -510,12 +522,15 @@ result = ::Gapic::Rest::PagedEnumerable.new @target_http_proxies_stub, :list, "items", request, result, options 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 ## # Patches the specified TargetHttpProxy resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. # @@ -585,12 +600,15 @@ ) 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 ## # Changes the URL map for TargetHttpProxy. # @@ -660,11 +678,14 @@ ) 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 TargetHttpProxies REST API. #