Skip to content

Commit

Permalink
Changes to add tracelog for Featureflag exceptions (#4809)
Browse files Browse the repository at this point in the history
* Changes to tracelog Featueflag exceptions

* Addressing review comments

* Convertring the trace to error

* nit changes

---------

Co-authored-by: Dmitrii Bobreshev <[email protected]>
  • Loading branch information
dogirala and DmitriiBobreshev authored May 31, 2024
1 parent d9da7ec commit beac576
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Agent.Worker/TestResults/Utils/FeatureFlagService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ public bool GetFeatureFlagState(string featureFlagName, Guid serviceInstanceId)
}
_executionContext.Debug(StringUtil.Format("{0} is off", featureFlagName));
}
catch
catch(Exception ex)
{
_executionContext.Debug(StringUtil.Format("Failed to get FF {0} Value.", featureFlagName));
var exceptionMessage = StringUtil.Format("Failed to get FF {0} Value. Error: {1}", featureFlagName, ex.ToString());
_executionContext.Warning(exceptionMessage);
Trace.Error(exceptionMessage);
}
return false;
}
Expand Down

0 comments on commit beac576

Please sign in to comment.