From a724f486f8f5741fbcf020e64c0593ed8ec59643 Mon Sep 17 00:00:00 2001 From: Christian Stein Date: Tue, 4 Feb 2020 09:34:01 +0100 Subject: [PATCH] Fixes missing error message from Icinga Director Self-Service API on Wizard --- lib/core/icingaagent/misc/Start-IcingaAgentDirectorWizard.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/icingaagent/misc/Start-IcingaAgentDirectorWizard.psm1 b/lib/core/icingaagent/misc/Start-IcingaAgentDirectorWizard.psm1 index 02e83a0..53b4556 100644 --- a/lib/core/icingaagent/misc/Start-IcingaAgentDirectorWizard.psm1 +++ b/lib/core/icingaagent/misc/Start-IcingaAgentDirectorWizard.psm1 @@ -79,7 +79,7 @@ function Start-IcingaAgentDirectorWizard() $SelfServiceAPIKey = Register-IcingaDirectorSelfServiceHost -DirectorUrl $DirectorUrl -ApiKey $SelfServiceAPIKey -Hostname (Get-IcingaHostname @Arguments) -Endpoint $Arguments.IcingaMaster; break; } catch { - $SelfServiceAPIKey = (Get-IcingaAgentInstallerAnswerInput -Prompt ([string]::Format('Failed to register host within Icinga Director. Please re-enter your SelfService API Key. If this prompt continues, drop your host key at "Hosts -> {0} -> Agent"', (Get-IcingaHostname @Arguments))) -Default 'v' -DefaultInput $SelfServiceAPIKey).answer; + $SelfServiceAPIKey = (Get-IcingaAgentInstallerAnswerInput -Prompt ([string]::Format('Failed to register host within Icinga Director. Full error: "{0}". Please re-enter your SelfService API Key. If this prompt continues ensure you are using an Agent template or drop your host key at "Hosts -> {1} -> Agent"', $_.Exception.Message, (Get-IcingaHostname @Arguments))) -Default 'v' -DefaultInput $SelfServiceAPIKey).answer; } }