소스 검색

fix: api provider checkDeviceOnline errors

luzhenqian 4 년 전
부모
커밋
9b72d9b08e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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
 	}