Skip to content

Commit 7e40f40

Browse files
Merge pull request #7 from balukambala/ignite
removed NOT FOUND exception handling from getConfiguration which breaks ...
2 parents 2e23de7 + 6173a2b commit 7e40f40

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

src/ResourceManager/Automation/Commands.Automation/Common/AutomationClientDSC.cs

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -71,25 +71,13 @@ public Model.DscConfiguration GetConfiguration(
7171
Requires.Argument("AutomationAccountName", automationAccountName).NotNull();
7272
Requires.Argument("ConfigurationName", configurationName).NotNull();
7373

74-
try
75-
{
76-
var configuration =
77-
this.automationManagementClient.Configurations.Get(
78-
resourceGroupName,
79-
automationAccountName,
80-
configurationName).Configuration;
81-
82-
return new Model.DscConfiguration(resourceGroupName, automationAccountName, configuration);
83-
}
84-
catch (CloudException cloudException)
85-
{
86-
if (cloudException.Response.StatusCode == HttpStatusCode.NotFound)
87-
{
88-
throw new ResourceNotFoundException(typeof(Model.DscConfiguration), string.Format(CultureInfo.CurrentCulture, Resources.ConfigurationNotFound, configurationName));
89-
}
74+
var configuration =
75+
this.automationManagementClient.Configurations.Get(
76+
resourceGroupName,
77+
automationAccountName,
78+
configurationName).Configuration;
9079

91-
throw;
92-
}
80+
return new Model.DscConfiguration(resourceGroupName, automationAccountName, configuration);
9381
}
9482
}
9583

0 commit comments

Comments
 (0)