server get login info 404 not found

This commit is contained in:
TangBin
2020-01-15 19:16:24 +08:00
parent 5e4155061f
commit 4d6921285e
+2 -2
View File
@@ -15,13 +15,13 @@
package modules
import (
"fmt"
"strings"
"yunion.io/x/jsonutils"
"yunion.io/x/pkg/gotypes"
"yunion.io/x/pkg/utils"
"yunion.io/x/onecloud/pkg/httperrors"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
"yunion.io/x/onecloud/pkg/util/seclib2"
@@ -50,7 +50,7 @@ func (this *ServerManager) GetLoginInfo(s *mcclient.ClientSession, id string, pa
loginKey, e := data.GetString("metadata", "login_key")
if e != nil {
return nil, fmt.Errorf("No login key: %s", e)
return nil, httperrors.NewNotFoundError("No login key: %s", e)
}
if len(loginKey) > 0 {