Skip to content

Commit 1f25e51

Browse files
committed
chore(client): Pass error back to Command if certificate download from AKV fails
1 parent ce8e0f7 commit 1f25e51

File tree

2 files changed

+4
-30
lines changed

2 files changed

+4
-30
lines changed

AzureAppGatewayOrchestrator/Client/GatewayClient.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,9 @@ public IEnumerable<CurrentInventoryItem> GetAppGatewaySslCertificates()
316316
}
317317
catch (Exception e)
318318
{
319-
_logger.LogError($"Error retrieving certificate from Azure Key Vault with ID {certObject.KeyVaultSecretId}: {e.Message}");
320-
continue;
319+
string error = $"Error retrieving certificate from Azure Key Vault with ID {certObject.KeyVaultSecretId}: {e.Message}";
320+
_logger.LogError(error);
321+
throw new Exception(error);
321322
}
322323
}
323324
else

Makefile

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -62,33 +62,6 @@ setup: ## Setup the environment for development
6262
echo "PROJECT_NAME=$$(basename $$(dirname $$(grep PROJECT_FILE .env | cut -d '=' -f 2)))" >> .env; \
6363
fi
6464

65-
.PHONY: newtest
66-
newtest: setup ## Create a new test project
67-
@source .env; \
68-
testProjectName="$$PROJECT_NAME".Tests; \
69-
echo "Creating new xUnit project called $$testProjectName"; \
70-
dotnet new xunit -o $$testProjectName; \
71-
dotnet sln add $$testProjectName/$$testProjectName.csproj; \
72-
dotnet add $$testProjectName reference $$PROJECT_FILE;
73-
74-
.PHONY: installpackage
75-
installpackage: ## Install a package to the project
76-
@source .env; \
77-
echo "Select a project to install the package into"; \
78-
PS3="Selection: "; \
79-
select opt in $$(ls */*.csproj); do \
80-
if [ -n "$$opt" ]; then \
81-
echo "You have selected $$opt"; \
82-
break; \
83-
else \
84-
echo "Invalid selection. Please try again."; \
85-
fi; \
86-
done; \
87-
echo "Enter the package name to install: "; \
88-
read packageName; \
89-
echo "Installing $$packageName to $$opt"; \
90-
dotnet add $$opt package $$packageName;
91-
9265
.PHONY: testall
9366
testall: ## Run all tests.
9467
@source .env; \
@@ -105,7 +78,7 @@ test: ## Run a single test.
10578
cut -d ' ' -f 5- | \
10679
sed 's/(.*//i' | \
10780
sort | uniq | \
108-
fzf | \
81+
fzf | \
10982
xargs -I {} dotnet test --filter {} --logger "console;verbosity=detailed"
11083

11184
##@ Build

0 commit comments

Comments
 (0)