mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-12 14:30:19 -05:00
idm: Fix error handling on startup (#3243)
* Fix idm to acutally return error during startup to the runtime * Add proper conditon to error log statement
This commit is contained in:
@@ -40,8 +40,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
}()
|
||||
|
||||
defer cancel()
|
||||
start(ctx, logger, cfg)
|
||||
return nil
|
||||
return start(ctx, logger, cfg)
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -67,8 +66,9 @@ func start(ctx context.Context, logger log.Logger, cfg *config.Config) error {
|
||||
}
|
||||
if _, err := os.Stat(servercfg.BoltDBFile); errors.Is(err, os.ErrNotExist) {
|
||||
logger.Debug().Msg("Bootstrapping IDM database")
|
||||
err = bootstrap(logger, cfg, servercfg)
|
||||
logger.Error().Err(err).Msg("failed")
|
||||
if err = bootstrap(logger, cfg, servercfg); err != nil {
|
||||
logger.Error().Err(err).Msg("failed to bootstrap idm database")
|
||||
}
|
||||
}
|
||||
|
||||
svc, err := server.NewServer(&servercfg)
|
||||
|
||||
Reference in New Issue
Block a user