Repository navigation
Description
As pointed out by #3344 (comment) and a quick grep:
❯ grep -r -B2 'os.Exit(1)' . | grep -B2 server.go | grep -v vendor
--
--
--
--
--
./pkg/log/log.go: os.Exit(1)
--
./services/antivirus/pkg/command/server.go- if err != nil {
./services/antivirus/pkg/command/server.go- logger.Error().Err(err).Str("server", "antivirus").Msg("Failed to initialize antivirus service")
./services/antivirus/pkg/command/server.go: os.Exit(1)
--
./services/storage-users/pkg/command/uploads.go: os.Exit(1)
--
./services/postprocessing/pkg/command/server.go- if err != nil {
./services/postprocessing/pkg/command/server.go- fmt.Printf("%v", err)
./services/postprocessing/pkg/command/server.go: os.Exit(1)
--
./services/proxy/pkg/server/http/server.go- if err := pkgcrypto.GenCert(httpCfg.TLSCert, httpCfg.TLSKey, l); err != nil {
./services/proxy/pkg/server/http/server.go- l.Fatal().Err(err).Msgf("Could not generate test-certificate")
./services/proxy/pkg/server/http/server.go: os.Exit(1)
--
./services/idp/pkg/server/http/server.go- if err := pkgcrypto.GenCert(options.Config.HTTP.TLSCert, options.Config.HTTP.TLSKey, options.Logger); err != nil {
./services/idp/pkg/server/http/server.go- options.Logger.Fatal().Err(err).Msg("Could not setup TLS")
./services/idp/pkg/server/http/server.go: os.Exit(1)
We are still making calls to exit in error cases.
This might corrupt the nats index and sucks in general, because other goroutines used for services and workers have no way to shut down properly.
Since #3140 you can simply return the error
Reacted by Dominik Schmidt
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsTodo
Activity
rhafer commentedon Aug 19, 2026
Here's another one that we should address:
opencloud/services/postprocessing/pkg/service/service.go
Line 136 in 6d2cbd3
fix: return errors instead of calling os.Exit
fix: return errors instead of calling os.Exit
fix: return errors instead of calling os.Exit