Procházet zdrojové kódy

fix: api provider checkDeviceOnline errors

luzhenqian před 4 roky
rodič
revize
9b72d9b08e
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      services/apiprovider/middleware.go

+ 1 - 1
services/apiprovider/middleware.go

@@ -107,7 +107,7 @@ func CheckDeviceOnline(context martini.Context, params martini.Params, req *http
 	err = server.RPCCallByName(nil, "devicemanager", "DeviceManager.GetDeviceOnlineStatus", onlineargs, &onlinereply)
 	if err != nil {
 		server.Log.Errorf("get device online status error: %v", err)
-		r.JSON(http.StatusOK, renderError(ErrDeviceNotOnline, errors.Wrap(err, "get device online status error")))
+		r.JSON(http.StatusOK, renderError(ErrDeviceNotOnline, errors.New("get device online status error "+err.Error())))
 		return
 	}