Skip to content

Commit

Permalink
Merge pull request #879 from DeveloperMetrics/ReinstatedExceptionThro…
Browse files Browse the repository at this point in the history
…wing

Added throws back into code
  • Loading branch information
samsmithnz authored Jun 15, 2023
2 parents 0a5d63b + 441f175 commit 7694ffb
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public async Task<ProcessingResult> UpdateDORASummaryItem(
//Instead of throwing exceptions when there are no secrets, add the error message to the overall processing message
string errorMessage = null;
if (isGitHub == true)
{
{
//Get the client id and secret from the settings
string clientIdName = PartitionKeys.CreateGitHubSettingsPartitionKeyClientId(owner, repo);
string clientSecretName = PartitionKeys.CreateGitHubSettingsPartitionKeyClientSecret(owner, repo);
Expand All @@ -77,6 +77,7 @@ public async Task<ProcessingResult> UpdateDORASummaryItem(
if (string.IsNullOrEmpty(clientId) || string.IsNullOrEmpty(clientSecret))
{
errorMessage = $"clientId '{clientId}' or clientSecret '{clientSecret}' not found in key vault";
throw new Exception(errorMessage);
}
}
else
Expand All @@ -86,6 +87,7 @@ public async Task<ProcessingResult> UpdateDORASummaryItem(
if (string.IsNullOrEmpty(patToken))
{
errorMessage = $"patToken '{patTokenName}' not found in key vault";
throw new Exception(errorMessage);
}
}

Expand Down

0 comments on commit 7694ffb

Please sign in to comment.