@@ -44,7 +44,7 @@ func (p *HostPortal) ListHosts() {
4444
4545 m , err := p .GetParameters ()
4646 if err != nil {
47- errMsg := fmt .Sprintf ("list hosts failed: %s" , err .Error ())
47+ errMsg := fmt .Sprintf ("get the query parameters of host failed: %s" , err .Error ())
4848 p .ErrorHandle (model .ErrorBadRequest , errMsg )
4949 return
5050 }
@@ -86,7 +86,7 @@ func (p *HostPortal) CreateHost() {
8686 // HostName should be unique in the system
8787 hostArr , err := db .C .ListHostsByName (c .GetContext (p .Ctx ), host .HostName )
8888 if err != nil {
89- errMsg := fmt .Sprintf ("list hosts failed in CreateHost method: %v" , err )
89+ errMsg := fmt .Sprintf ("check host %s failed in CreateHost method: %v" , host . HostName , err )
9090 p .ErrorHandle (model .ErrorBadRequest , errMsg )
9191 return
9292 }
@@ -197,7 +197,7 @@ func (p *HostPortal) DeleteHost() {
197197 return
198198 }
199199 if len (attachments ) > 0 {
200- errMsg := fmt .Sprintf ("some volumes are attached to host: %s, please remove them first" , host .HostName )
200+ errMsg := fmt .Sprintf ("some volumes are attached to host: %s, please detach them first" , host .HostName )
201201 p .ErrorHandle (model .ErrorBadRequest , errMsg )
202202 return
203203 }
0 commit comments