From baa19d5317c95b7a06d56a9549714b08946ab259 Mon Sep 17 00:00:00 2001 From: Rewrite0 <49576640+Rewrite0@users.noreply.github.com> Date: Sun, 4 Jun 2023 20:06:56 +0800 Subject: [PATCH] feat: close #17 --- src/hooks/useAuth.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/hooks/useAuth.ts b/src/hooks/useAuth.ts index 43559200..a08a6a7d 100644 --- a/src/hooks/useAuth.ts +++ b/src/hooks/useAuth.ts @@ -45,7 +45,12 @@ export const useAuth = createSharedComposable(() => { onError((err) => { const error = err as ApiError; - message.error(error.detail); + + if (error.status === 404) { + message.error('请更新AutoBangumi!'); + } else { + message.error(error.detail); + } }); if (check()) {