File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/GuestConfiguration/GuestConfiguration/Common Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -322,12 +322,12 @@ private IEnumerable<PolicyData> GetPolicyStatusesHelper(PolicySetDefinition[] po
322
322
foreach ( var policyDefinitionIdInInitiative in policyDefinitionIdsInInitiative )
323
323
{
324
324
var _initiativeName = GetInitiativeNameFromId ( policyDefinitionIdInInitiative ) ;
325
- PolicyDefinition policyDef ;
325
+ PolicyDefinition policyDef = null ;
326
326
try
327
327
{
328
328
policyDef = PolicyClient . PolicyDefinitions . GetBuiltIn ( _initiativeName ) ;
329
329
}
330
- catch ( Exception )
330
+ catch ( Microsoft . Rest . Azure . CloudException ex ) when ( HttpStatusCode . NotFound . Equals ( ex . Response . StatusCode ) )
331
331
{
332
332
policyDef = PolicyClient . PolicyDefinitions . Get ( _initiativeName ) ;
333
333
}
You can’t perform that action at this time.
0 commit comments