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

- old
+ new

@@ -222,12 +222,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 NotificationEndpoint resource in the given region. # @@ -287,12 +290,15 @@ @region_notification_endpoints_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 ## # Create a NotificationEndpoint in the specified project in the given region using the parameters that are included in the request. # @@ -363,12 +369,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 ## # Lists the NotificationEndpoints for a project in the given region. # @@ -437,11 +446,14 @@ result = ::Gapic::Rest::PagedEnumerable.new @region_notification_endpoints_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 ## # Configuration class for the RegionNotificationEndpoints REST API. #