@be-link/request 1.45.1-beta.1 → 1.45.1-beta.2
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.
|
@@ -4,13 +4,10 @@ import { ResponseContext } from './response.types';
|
|
|
4
4
|
* 请求错误类型
|
|
5
5
|
*/
|
|
6
6
|
export interface RequestError {
|
|
7
|
+
code?: string;
|
|
7
8
|
message?: string;
|
|
8
9
|
status?: number;
|
|
9
|
-
|
|
10
|
-
status: number;
|
|
11
|
-
data?: unknown;
|
|
12
|
-
};
|
|
13
|
-
code?: string;
|
|
10
|
+
data?: unknown;
|
|
14
11
|
}
|
|
15
12
|
/**
|
|
16
13
|
* 请求拦截器接口
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interceptor.types.d.ts","sourceRoot":"","sources":["../../../src/core/types/interceptor.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,
|
|
1
|
+
{"version":3,"file":"interceptor.types.d.ts","sourceRoot":"","sources":["../../../src/core/types/interceptor.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,YAAY;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW;IACX,SAAS,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,cAAc,CAAC,GAAG,cAAc,CAAC;IACjF,aAAa;IACb,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC;CACnD;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,YAAY;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,aAAa;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW;IACX,UAAU,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;IACjG,aAAa;IACb,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC;CACnE;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -1629,9 +1629,8 @@ var AuthInterceptor = /** @class */ (function () {
|
|
|
1629
1629
|
value: function (error) {
|
|
1630
1630
|
return __awaiter$3(this, void 0, void 0, function () {
|
|
1631
1631
|
var status, loginPath;
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
status = ((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) || error.status;
|
|
1632
|
+
return __generator$3(this, function (_a) {
|
|
1633
|
+
status = error.status;
|
|
1635
1634
|
if (status === 401) {
|
|
1636
1635
|
// 清理时间同步数据
|
|
1637
1636
|
this.timeSyncService.clear();
|
package/dist/index.esm.js
CHANGED
|
@@ -1626,9 +1626,8 @@ var AuthInterceptor = /** @class */ (function () {
|
|
|
1626
1626
|
value: function (error) {
|
|
1627
1627
|
return __awaiter$3(this, void 0, void 0, function () {
|
|
1628
1628
|
var status, loginPath;
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
status = ((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) || error.status;
|
|
1629
|
+
return __generator$3(this, function (_a) {
|
|
1630
|
+
status = error.status;
|
|
1632
1631
|
if (status === 401) {
|
|
1633
1632
|
// 清理时间同步数据
|
|
1634
1633
|
this.timeSyncService.clear();
|