@base-web-kits/base-tools-web 1.4.0 → 1.4.1
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.cjs
CHANGED
|
@@ -2194,7 +2194,10 @@ function request(config) {
|
|
|
2194
2194
|
return;
|
|
2195
2195
|
}
|
|
2196
2196
|
if (!isAbortError && toastError)
|
|
2197
|
-
(_i = appConfig2.toast) == null ? void 0 : _i.call(appConfig2, {
|
|
2197
|
+
(_i = appConfig2.toast) == null ? void 0 : _i.call(appConfig2, {
|
|
2198
|
+
status,
|
|
2199
|
+
msg: `\u8BF7\u6C42\u5931\u8D25: ${e instanceof Error ? e.message : JSON.stringify(e)}`
|
|
2200
|
+
});
|
|
2198
2201
|
logRequestInfo({ status, config: logConfig, startTime, e });
|
|
2199
2202
|
reject(e);
|
|
2200
2203
|
} finally {
|
|
@@ -2390,7 +2393,7 @@ function enhanceWebApi(webApi, apiName) {
|
|
|
2390
2393
|
const msg = typeof toastError === "function" ? toastError(e) : toastError;
|
|
2391
2394
|
if (msg) {
|
|
2392
2395
|
toast == null ? void 0 : toast({
|
|
2393
|
-
msg: typeof msg === "string" ? msg : `${fname} fail: ${JSON.stringify(e)}`,
|
|
2396
|
+
msg: typeof msg === "string" ? msg : `${fname} fail: ${e instanceof Error ? e.message : JSON.stringify(e)}`,
|
|
2394
2397
|
status: "fail"
|
|
2395
2398
|
});
|
|
2396
2399
|
}
|