Skip to content

Commit 62b8f23

Browse files
committed
make the errors a bit more not-scary
1 parent 505143c commit 62b8f23

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

cmd/ocm-backplane/login/login.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -424,13 +424,14 @@ func runLogin(cmd *cobra.Command, argv []string) (err error) {
424424
cfg, _ := BuildRestConfig(bpAPIClusterURL, accessToken, proxyURL)
425425
clientset, err := kubernetes.NewForConfig(cfg)
426426
if err != nil {
427-
logger.Errorln("Unable to build kube client from rest config")
427+
logger.Debug("Unable to build kube client from rest config to check for other Backplane sessions")
428+
logger.Warn("Can not check for other Backplane sessions. You should still be logged in")
428429
return nil
429430
}
430431

431432
sessions, err := login.FindOtherSessions(clientset, cfg)
432433
if err != nil {
433-
logger.Error("Could not check for other sessions.")
434+
logger.Warn("Could not check for other Backplane sessions. You should still be logged in")
434435
return nil
435436
}
436437

pkg/login/additional_login_detector.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ func FindOtherSessions(clientset kubernetes.Interface, config *rest.Config) (map
4040

4141
token, err := getTokenFromConfig(config)
4242
if err != nil {
43-
logger.Error("Unable to get token for self review to find other sessions")
43+
logger.Warn("Unable to get token for self review to find other sessions")
4444
return sessions, err
4545
}
4646

4747
myUsername, err := whoami(clientset, token)
4848
if err != nil {
49-
logger.Error("Unable to determine who I am to find other sessions")
49+
logger.Warn("Unable to determine who I am to find other sessions")
5050
return sessions, err
5151
}
5252

0 commit comments

Comments
 (0)