Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

youzanyun-sdk-nodejs

Package Overview
Dependencies
Maintainers
3
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

youzanyun-sdk-nodejs - npm Package Compare versions

Comparing version 2.0.0-beta.16 to 2.0.0-beta.17

8

lib/api-client.js

@@ -132,8 +132,12 @@ "use strict";

code,
data
data,
gw_err_resp
} = response.data || {};
const {
err_code
} = gw_err_resp || {};
if (CODE_SUCCESS.includes(+code)) {
resolve(data);
} else if (CODE_INVALID.includes(+code) && config.retryCount <= MAX_RETRIES.TOKEN_INVALID) {
} else if (CODE_INVALID.includes(+err_code) && config.retryCount <= MAX_RETRIES.TOKEN_INVALID) {
// 重试请求

@@ -140,0 +144,0 @@ request();

"use strict";
module.exports = {
CODE_SUCCESS: [0, 200],
CODE_SUCCESS: [200],
// 响应成功

@@ -6,0 +6,0 @@ CODE_INVALID: [4201, // 非法的请求凭证

{
"name": "youzanyun-sdk-nodejs",
"version": "2.0.0-beta.16",
"version": "2.0.0-beta.17",
"description": "有赞云 nodejs sdk",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -83,6 +83,11 @@ const TokenService = require('./token');

this.logger.info('dktest-success', response);
const { code, data } = response.data || {};
const { code, data, gw_err_resp } = response.data || {};
const { err_code } = gw_err_resp || {};
if (CODE_SUCCESS.includes(+code)) {
resolve(data);
} else if (CODE_INVALID.includes(+code) && config.retryCount <= MAX_RETRIES.TOKEN_INVALID) {
} else if (
CODE_INVALID.includes(+err_code) &&
config.retryCount <= MAX_RETRIES.TOKEN_INVALID
) {
// 重试请求

@@ -89,0 +94,0 @@ request();

module.exports = {
CODE_SUCCESS: [0, 200], // 响应成功
CODE_SUCCESS: [200], // 响应成功
CODE_INVALID: [

@@ -4,0 +4,0 @@ 4201, // 非法的请求凭证

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc