From 0c7bb492e20757c7feb61275cc114946ad87ef78 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 28 Aug 2024 22:16:27 +0000 Subject: [PATCH] use UNAVAILABLE if CDS resource is not okay --- .../ext/filters/gcp_authentication/gcp_authentication_filter.cc | 2 +- test/core/filters/gcp_authentication_filter_test.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc b/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc index 9b68863891b8f..c3a6ab3e71bcf 100644 --- a/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc +++ b/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc @@ -75,7 +75,7 @@ absl::Status GcpAuthenticationFilter::Call::OnClientInitialMetadata( // because once that happens, a new instance of this filter will be // swapped in for subsequent calls, but *this* call is already tied // to this filter instance, which will never see the update. - return absl::UnauthenticatedError( + return absl::UnavailableError( absl::StrCat("GCP authentication filter: CDS resource unavailable for ", cluster_name)); } diff --git a/test/core/filters/gcp_authentication_filter_test.cc b/test/core/filters/gcp_authentication_filter_test.cc index 7a6029fc2141e..4c677df2b45b5 100644 --- a/test/core/filters/gcp_authentication_filter_test.cc +++ b/test/core/filters/gcp_authentication_filter_test.cc @@ -249,7 +249,7 @@ TEST_F(GcpAuthenticationFilterTest, FailsCallIfClusterNotOkayInXdsConfig) { service_config_call_data->SetCallAttribute(&xds_cluster_attribute); call.Start(call.NewClientMetadata()); EXPECT_EVENT(Finished( - &call, HasMetadataResult(absl::UnauthenticatedError(absl::StrCat( + &call, HasMetadataResult(absl::UnavailableError(absl::StrCat( "GCP authentication filter: CDS resource unavailable for ", kClusterName))))); Step();