Skip to content

Commit d8baf4e

Browse files
Merge pull request #544 from feichashao/ocm-login-err
feat: print ocm error in backplane session
2 parents b888b85 + 9a684b3 commit d8baf4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/cli/session/session.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func (e *BackplaneSession) RunCommand(cmd *cobra.Command, args []string) error {
7373
clusterID, clusterName, err := ocm.DefaultOCMInterface.GetTargetCluster(clusterKey)
7474

7575
if err != nil {
76-
return fmt.Errorf("invalid cluster Id %s", clusterKey)
76+
return fmt.Errorf("invalid cluster Id %s. error: %w", clusterKey, err)
7777
}
7878

7979
if e.Options.GlobalOpts.Manager {
@@ -103,7 +103,7 @@ func (e *BackplaneSession) RunCommand(cmd *cobra.Command, args []string) error {
103103

104104
err = e.initSessionPath()
105105
if err != nil {
106-
return fmt.Errorf("could not init session path")
106+
return fmt.Errorf("could not init session path. error: %w", err)
107107
}
108108

109109
if e.Options.DeleteSession {

0 commit comments

Comments
 (0)