@base-web-kits/base-tools-web 1.3.6 → 1.3.8
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 +93 -0
- package/dist/base-tools-web.umd.global.js +3 -2
- package/dist/base-tools-web.umd.global.js.map +1 -1
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/dist/network/request.d.ts.map +1 -1
- package/package.json +30 -30
- package/src/web/network/request.ts +3 -2
package/dist/index.mjs
CHANGED
|
@@ -1403,7 +1403,8 @@ function request(config) {
|
|
|
1403
1403
|
reject(timeoutError);
|
|
1404
1404
|
return;
|
|
1405
1405
|
}
|
|
1406
|
-
if (!isAbortError && toastError)
|
|
1406
|
+
if (!isAbortError && toastError)
|
|
1407
|
+
(_h = appConfig2.toast) == null ? void 0 : _h.call(appConfig2, { status, msg: `\u8BF7\u6C42\u5931\u8D25,${String(e)}` });
|
|
1407
1408
|
logRequestInfo({ status, config: logConfig, startTime, e });
|
|
1408
1409
|
reject(e);
|
|
1409
1410
|
} finally {
|
|
@@ -1453,7 +1454,7 @@ function logRequestInfo(options) {
|
|
|
1453
1454
|
info.res = cloneDeep(res);
|
|
1454
1455
|
log("info", info);
|
|
1455
1456
|
} else {
|
|
1456
|
-
info.e = e;
|
|
1457
|
+
info.e = e instanceof Error ? { name: e.name, message: e.message, stack: e.stack } : String(e);
|
|
1457
1458
|
log("error", info);
|
|
1458
1459
|
}
|
|
1459
1460
|
}
|