Commit fde90140 authored by Your Name's avatar Your Name

fix err code

parent 4dce1972
......@@ -63,6 +63,7 @@ func DCGM() {
fmt.Println("gpu error", err.Error())
res.Msg = err.Error()
res.Code = 500
return c.JSON(&res)
}
res.Data.Gpus = gpus
......@@ -73,6 +74,7 @@ func DCGM() {
fmt.Println("cpu error", err.Error())
res.Msg = err.Error()
res.Code = 500
return c.JSON(&res)
}
res.Data.Cpus = cpus
......@@ -83,6 +85,7 @@ func DCGM() {
fmt.Println("network error", err.Error())
res.Msg = err.Error()
res.Code = 500
return c.JSON(&res)
}
res.Data.Networks = networks
......@@ -93,6 +96,7 @@ func DCGM() {
fmt.Println("disks error", err.Error())
res.Msg = err.Error()
res.Code = 500
return c.JSON(&res)
}
res.Data.Disk = filesystems
......@@ -103,6 +107,7 @@ func DCGM() {
fmt.Println("mem error", err.Error())
res.Msg = err.Error()
res.Code = 500
return c.JSON(&res)
}
res.Data.Mem = mem
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment