@byted-apaas/server-sdk-node 1.1.21 → 1.1.22-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -68,6 +68,10 @@ class _KObjectSync {
68
68
  if (this.appCtx && this.appCtx.dataVersion === 'v3') {
69
69
  return this.deleteV3(recordOrRecordID);
70
70
  }
71
+ // v1 v2 接口只支持 number 类型
72
+ if (typeof recordOrRecordID === 'string') {
73
+ throw new server_common_node_1.exceptions.InvalidParamError('record._id must be number');
74
+ }
71
75
  let recordID;
72
76
  // 用户直接传入 record id 来进行删除的情况
73
77
  if (typeof recordOrRecordID === 'number') {
@@ -133,6 +137,10 @@ class _KObjectSync {
133
137
  if (this.appCtx && this.appCtx.dataVersion === 'v3') {
134
138
  return this.updateV3(_idOrRecordMap, recordMap);
135
139
  }
140
+ // v1 v2 接口只支持 number 类型
141
+ if (typeof _idOrRecordMap === 'string') {
142
+ throw new server_common_node_1.exceptions.InvalidParamError('record._id must be number');
143
+ }
136
144
  // record 必须包含 _id
137
145
  let record;
138
146
  // 用户显式传入 id 的情况
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byted-apaas/server-sdk-node",
3
- "version": "1.1.21",
3
+ "version": "1.1.22-beta.0",
4
4
  "description": "aPaaS Server SDK",
5
5
  "author": "zhouwexin <zhouwexin@bytedance.com>",
6
6
  "homepage": "",
@@ -868,6 +868,7 @@ async function oql(oql, args, namedArgs, authType) {
868
868
  if (e.message.includes("TimeoutError")) {
869
869
  throw new exceptions.CallOpenapiError(`OQL timeout, please check the query statement and the execution time of the query statement.`);
870
870
  }
871
+ throw e;
871
872
  }
872
873
  return [];
873
874
  }