mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-31 09:02:41 +01:00
Add a more informative throw when kestrel configuration is missing
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user