lib/google/cloud/compute/v1/url_maps/rest/client.rb in google-cloud-compute-v1-1.7.0 vs lib/google/cloud/compute/v1/url_maps/rest/client.rb in google-cloud-compute-v1-1.7.1
- old
+ new
@@ -233,12 +233,15 @@
result = ::Gapic::Rest::PagedEnumerable.new @url_maps_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 UrlMap resource.
#
@@ -306,12 +309,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 UrlMap resource. Gets a list of available URL maps by making a list() request.
#
@@ -369,12 +375,15 @@
@url_maps_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 UrlMap resource in the specified project using the data included in the request.
#
@@ -442,12 +451,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
##
# Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap. For more information, see [Invalidating cached content](/cdn/docs/invalidating-cached-content).
#
@@ -517,12 +529,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 UrlMap resources available to the specified project.
#
@@ -589,12 +604,15 @@
result = ::Gapic::Rest::PagedEnumerable.new @url_maps_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 UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
#
@@ -664,12 +682,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
##
# Updates the specified UrlMap resource with the data included in the request.
#
@@ -739,12 +760,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
##
# Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.
#
@@ -804,11 +828,14 @@
@url_maps_stub.validate 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 UrlMaps REST API.
#