Skip to content

Commit 1cafe1e

Browse files
Managed Challenge plugin - log missing config
1 parent 00af687 commit 1cafe1e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Certify.Providers/DNS/CertifyManaged/DnsProviderCertifyManaged.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,12 @@ public async Task<bool> InitProvider(Dictionary<string, string> credentials, Dic
200200
_log = log;
201201
_parameters = parameters;
202202

203+
if (_credentials == null || _credentials.Count == 0)
204+
{
205+
_log.Error("Certify Managed Challenge DNS Provider could not be created: credentials missing or not set for managed challenge API.");
206+
return false;
207+
}
208+
203209
if (parameters?.ContainsKey("propagationdelay") == true)
204210
{
205211
if (int.TryParse(parameters["propagationdelay"], out var customPropDelay))
@@ -219,6 +225,11 @@ public async Task<bool> InitProvider(Dictionary<string, string> credentials, Dic
219225

220226
_client.BaseAddress = _apiBaseUri;
221227
}
228+
else
229+
{
230+
_log.Error("Certify Managed Challenge DNS Provider could not be created: managed challenge API URL not set.");
231+
return false;
232+
}
222233

223234
return await Task.FromResult(true);
224235
}

0 commit comments

Comments
 (0)