@be-link/pos-cli-nodejs 0.0.79 → 0.0.80

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/pos/http.js +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/pos-cli-nodejs",
3
- "version": "0.0.79",
3
+ "version": "0.0.80",
4
4
  "description": "正向订单服务Nodejs客户端",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/pos/http.js CHANGED
@@ -22,7 +22,11 @@ async function callApi(url, ...request) {
22
22
  }
23
23
  catch (error) {
24
24
  const axiosError = error;
25
- const ErrorClass = axiosError.response?.status === 400 ? BizError_1.default : SystemError_1.default;
25
+ const ErrorClass = axiosError.response
26
+ ? axiosError.response.status === 400
27
+ ? BizError_1.default
28
+ : SystemError_1.default
29
+ : SystemError_1.default;
26
30
  if (axiosError.response) {
27
31
  const response = axiosError.response;
28
32
  const data = response.data;