lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb in google-cloud-compute-v1-1.7.0 vs lib/google/cloud/compute/v1/region_ssl_certificates/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 SslCertificate resource in the specified region. Get a list of available SSL certificates by making a list() request. # @@ -287,12 +290,15 @@ @region_ssl_certificates_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 SslCertificate resource in the specified project and region using the data 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 ## # Retrieves the list of SslCertificate resources available to the specified project in the specified region. # @@ -437,11 +446,14 @@ result = ::Gapic::Rest::PagedEnumerable.new @region_ssl_certificates_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 RegionSslCertificates REST API. #