Add a more informative throw when kestrel configuration is missing

This commit is contained in:
Jordan Brown
2020-04-24 14:29:55 -04:00
parent 1d1854f842
commit e1a10bc0dd
@@ -21,11 +21,14 @@ namespace Tgstation.Server.Host.Core
var httpEndpoint = configuration
.GetSection("Kestrel")
.GetSection("Endpoints")
.GetSection("EndPoints")
.GetSection("Http")
.GetSection("Url")
.Value;
if (httpEndpoint == null)
throw new InvalidOperationException("Missing required configuration option for Kestrel:EndPoints:Http:Url!");
HttpApiPort = GetPortFromAddress(httpEndpoint);
}