From 83ff5771ec4fdbd6d3314a82628423a7c9bc97dc Mon Sep 17 00:00:00 2001 From: Denis Nikulin Date: Fri, 1 Nov 2024 19:55:04 +0400 Subject: [PATCH] Replaced specific exception handlers with the common one during FF requests (#5027) --- .../Configuration/FeatureFlagProvider.cs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/Agent.Listener/Configuration/FeatureFlagProvider.cs b/src/Agent.Listener/Configuration/FeatureFlagProvider.cs index ef72f6bec2..ac8fdcf752 100644 --- a/src/Agent.Listener/Configuration/FeatureFlagProvider.cs +++ b/src/Agent.Listener/Configuration/FeatureFlagProvider.cs @@ -61,21 +61,11 @@ public async Task GetFeatureFlagWithCred(IHostContext context, stri { return await client.GetFeatureFlagByNameAsync(featureFlagName, checkFeatureExists: false, ctk); } - catch (VssServiceException e) + catch (Exception e) { Trace.Warning("Unable to retrieve feature flag status: " + e.ToString()); return new FeatureFlag(featureFlagName, "", "", "Off", "Off"); } - catch (VssUnauthorizedException e) - { - Trace.Warning("Unable to retrieve feature flag with following exception: " + e.ToString()); - return new FeatureFlag(featureFlagName, "", "", "Off", "Off"); - } - catch (TimeoutException e) - { - Trace.Warning("Unable to retrieve feature flag status due to timeout error: " + e.ToString()); - return new FeatureFlag(featureFlagName, "", "", "Off", "Off"); - } } } }