From 99564c4fb1ecdcb26ed73062a5f1f7cb01ccae45 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Tue, 3 Jan 2023 15:46:06 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=B8=B4=E6=97=B6=E6=94=BE?= =?UTF-8?q?=E5=BC=80=E9=94=99=E8=AF=AF=E6=8A=9B=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/shared/hooks/useAsyncRequest.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/shared/hooks/useAsyncRequest.ts b/client/shared/hooks/useAsyncRequest.ts index 06e05f0a..07555099 100644 --- a/client/shared/hooks/useAsyncRequest.ts +++ b/client/shared/hooks/useAsyncRequest.ts @@ -12,8 +12,9 @@ export function useAsyncRequest( try { return await fn(...args); } catch (err) { - showErrorToasts(isDevelopment ? err : t('系统忙, 请稍后再试')); - console.error(err); + // showErrorToasts(isDevelopment ? err : t('系统忙, 请稍后再试')); + showErrorToasts(err); // 暂时放开所有错误抛出,正确的做法应该是仅对于内置代码相关的逻辑显示placeholder报错 + console.error('[useAsyncRequest] error:', err); } }, deps);