Parcourir la source

fix errors

Signed-off-by: Sean Holcomb <seanholcomb@gmail.com>
Sean Holcomb il y a 2 ans
Parent
commit
f6117004a5
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      pkg/cloud/config/controller.go

+ 2 - 2
pkg/cloud/config/controller.go

@@ -156,7 +156,7 @@ func (c *Controller) pullWatchers() {
 			}
 			}
 			err = c.save(statuses)
 			err = c.save(statuses)
 			if err != nil {
 			if err != nil {
-				fmt.Errorf("failed to save statuses %s", err.Error())
+				log.Errorf("failed to save statuses %s", err.Error())
 			}
 			}
 		}
 		}
 	}
 	}
@@ -171,7 +171,7 @@ func (c *Controller) CreateConfig(conf cloud.KeyedConfig) error {
 
 
 	err := conf.Validate()
 	err := conf.Validate()
 	if err != nil {
 	if err != nil {
-		return fmt.Errorf("provided configuration was invalid: %s", err.Error())
+		return fmt.Errorf("provided configuration was invalid: %w", err)
 	}
 	}
 
 
 	statuses, err := c.load()
 	statuses, err := c.load()