@ikenxuan/amagi 2.1.5 → 2.1.6

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.
@@ -1,5 +1,5 @@
1
1
  import { BiLiBiLiAPI, qtparam, wbi_sign } from '../../business/bilibili/index.js';
2
- import { Networks } from '../../model/index.js';
2
+ import { Networks, logger } from '../../model/index.js';
3
3
  export default class BilibiliData {
4
4
  type;
5
5
  headers;
@@ -132,7 +132,8 @@ export default class BilibiliData {
132
132
  const result = await new Networks(options).getData();
133
133
  if (result && result.code !== 0) {
134
134
  const errorMessage = errorMap[result.code] || '未知错误';
135
- throw new Error(`响应数据失败!\n请求接口类型:${this.type}\n请求URL:${options.url}\n错误代码:${result.code},\n含义:${errorMessage}`);
135
+ logger.warn(`响应数据失败!\n请求接口类型:${this.type}\n请求URL:${options.url}\n错误代码:${result.code},\n含义:${errorMessage}`);
136
+ return result;
136
137
  }
137
138
  else {
138
139
  return result;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikenxuan/amagi",
3
- "version": "2.1.5",
3
+ "version": "2.1.6",
4
4
  "type": "module",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",