diff --git a/services/frontend-service/pkg/cmd/server.go b/services/frontend-service/pkg/cmd/server.go index cbee6c401a..4d076904f9 100644 --- a/services/frontend-service/pkg/cmd/server.go +++ b/services/frontend-service/pkg/cmd/server.go @@ -18,6 +18,7 @@ package cmd import ( "context" + "errors" "fmt" "io" "net/http" @@ -77,16 +78,21 @@ func RunServer() { func runServer(ctx context.Context) error { err := envconfig.Process("kuberpult", &c) + if err != nil { - logger.FromContext(ctx).Fatal("config.parse", zap.Error(err)) + logger.FromContext(ctx).Error("config.parse", zap.Error(err)) return err } logger.FromContext(ctx).Warn(fmt.Sprintf("config: \n%v", c)) if c.GitAuthorEmail == "" { - logger.FromContext(ctx).Fatal("DefaultGitAuthorEmail must not be empty") + msg := "DefaultGitAuthorEmail must not be empty" + logger.FromContext(ctx).Error(msg) + return errors.New(msg) } if c.GitAuthorName == "" { - logger.FromContext(ctx).Fatal("DefaultGitAuthorName must not be empty") + msg := "DefaultGitAuthorName must not be empty" + logger.FromContext(ctx).Error(msg) + return errors.New(msg) } var jwks *keyfunc.JWKS = nil