@seayoo-io/combo-sdk-node 0.3.0 → 0.3.1
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.
- package/README.md +2 -2
- package/dist/const.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -379,7 +379,7 @@ function gmCommandHandler(command, args, requestId, version) {
|
|
|
379
379
|
// 参数 args 由协议定义,在使用前需要做严格的格式和逻辑校验
|
|
380
380
|
// 返回值需要根据协议定义进行响应,通常是一个包含了多个字段的 object
|
|
381
381
|
return await execSomeCommand(args);
|
|
382
|
-
|
|
382
|
+
case "OtherCmdName":
|
|
383
383
|
// 抛出自定义错误有三种方式:
|
|
384
384
|
// 1. 返回一个 Error 对象,最终响应以 500(internalServerError)作为 http status
|
|
385
385
|
return new Error("自定义错误信息")
|
|
@@ -390,7 +390,7 @@ function gmCommandHandler(command, args, requestId, version) {
|
|
|
390
390
|
throw new Error("some unknown error")
|
|
391
391
|
...
|
|
392
392
|
default: // 不识别的指令进行返回
|
|
393
|
-
|
|
393
|
+
return { error: GMError.InvalidCommand, message: "不识别的指令"+ command }
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
396
|
|
package/dist/const.d.ts
CHANGED
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED