@base-web-kits/base-tools-web 1.4.0 → 1.4.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.
- package/dist/async/index.d.ts.map +1 -1
- package/dist/base-tools-web.umd.global.js +5 -2
- package/dist/base-tools-web.umd.global.js.map +1 -1
- package/dist/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/dist/network/request.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/web/async/index.ts +4 -1
- package/src/web/network/request.ts +4 -1
package/dist/index.mjs
CHANGED
|
@@ -2131,7 +2131,10 @@ function request(config) {
|
|
|
2131
2131
|
return;
|
|
2132
2132
|
}
|
|
2133
2133
|
if (!isAbortError && toastError)
|
|
2134
|
-
(_i = appConfig2.toast) == null ? void 0 : _i.call(appConfig2, {
|
|
2134
|
+
(_i = appConfig2.toast) == null ? void 0 : _i.call(appConfig2, {
|
|
2135
|
+
status,
|
|
2136
|
+
msg: `\u8BF7\u6C42\u5931\u8D25: ${e instanceof Error ? e.message : JSON.stringify(e)}`
|
|
2137
|
+
});
|
|
2135
2138
|
logRequestInfo({ status, config: logConfig, startTime, e });
|
|
2136
2139
|
reject(e);
|
|
2137
2140
|
} finally {
|
|
@@ -2327,7 +2330,7 @@ function enhanceWebApi(webApi, apiName) {
|
|
|
2327
2330
|
const msg = typeof toastError === "function" ? toastError(e) : toastError;
|
|
2328
2331
|
if (msg) {
|
|
2329
2332
|
toast == null ? void 0 : toast({
|
|
2330
|
-
msg: typeof msg === "string" ? msg : `${fname} fail: ${JSON.stringify(e)}`,
|
|
2333
|
+
msg: typeof msg === "string" ? msg : `${fname} fail: ${e instanceof Error ? e.message : JSON.stringify(e)}`,
|
|
2331
2334
|
status: "fail"
|
|
2332
2335
|
});
|
|
2333
2336
|
}
|