🩹 Exit if couldn't set the secret and log server init error instead of panic

This commit is contained in:
M. Mert Yildiran 2023-10-20 20:55:16 +03:00
parent 1527f43396
commit 773cf371f3
No known key found for this signature in database
GPG Key ID: DA5D6DCBB758A461

View File

@ -77,7 +77,6 @@ func updateLicense(licenseKey string) {
updated, err := kubernetes.SetSecret(kubernetesProvider, kubernetes.SECRET_LICENSE, config.Config.License)
if err != nil {
log.Error().Err(err).Send()
return
}
if updated {
@ -125,7 +124,7 @@ func runLicenseRecieverServer() {
go func() {
if err := ginApp.Run(fmt.Sprintf(":%d", PRO_PORT)); err != nil {
panic(err)
log.Error().Err(err).Send()
}
}()