From a984e2700bd01754e5bb97b821c388f56ed765f9 Mon Sep 17 00:00:00 2001 From: James Elliott Date: Wed, 5 May 2021 10:50:24 +1000 Subject: [PATCH] refactor: use fatal log message on oidc init error (#1973) Instead of using panic() when an unknown error was detected on OP initialization, use logger.Fatalf. This provides a more useful output to the user. --- cmd/authelia/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/authelia/main.go b/cmd/authelia/main.go index 8e1254200..a23688fb3 100644 --- a/cmd/authelia/main.go +++ b/cmd/authelia/main.go @@ -121,7 +121,7 @@ func startServer() { oidcProvider, err := oidc.NewOpenIDConnectProvider(config.IdentityProviders.OIDC) if err != nil { - panic(err) + logger.Fatalf("Error initializing OpenID Connect Provider: %+v", err) } providers := middlewares.Providers{