diff --git a/lib/teleterm/clusters/storage.go b/lib/teleterm/clusters/storage.go index 9d6f5ef29c1df..81a9d968bc40c 100644 --- a/lib/teleterm/clusters/storage.go +++ b/lib/teleterm/clusters/storage.go @@ -209,9 +209,12 @@ func (s *Storage) fromProfile(profileName, leafClusterName string) (*Cluster, er // load profile status if key exists _, err = clusterClient.LocalAgent().GetKey(clusterNameForKey) if err != nil { - s.Log.WithError(err).Infof("Unable to load the keys for cluster %v.", clusterNameForKey) + if trace.IsNotFound(err) { + s.Log.Infof("No keys found for cluster %v.", clusterNameForKey) + } else { + return nil, trace.Wrap(err) + } } - if err == nil && cfg.Username != "" { status, err = client.ReadProfileStatus(s.Dir, profileName) if err != nil { @@ -225,9 +228,6 @@ func (s *Storage) fromProfile(profileName, leafClusterName string) (*Cluster, er } } } - if err != nil && !trace.IsNotFound(err) { - return nil, trace.Wrap(err) - } return &Cluster{ URI: clusterURI,