Ver Fonte

fix: api provider checkDeviceOnline errors

luzhenqian há 4 anos atrás
pai
commit
9b72d9b08e
1 ficheiros alterados com 1 adições e 1 exclusões
  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
 	}