Skip to content

Commit

Permalink
Replaced specific exception handlers with the common one during FF re…
Browse files Browse the repository at this point in the history
…quests (#5027)
  • Loading branch information
DenisNikulin5 authored Nov 1, 2024
1 parent 31298ce commit 83ff577
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/Agent.Listener/Configuration/FeatureFlagProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,11 @@ public async Task<FeatureFlag> 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");
}
}
}
}

0 comments on commit 83ff577

Please sign in to comment.