From 74c3bc7034acfc1ddc73de1332aca8f938480021 Mon Sep 17 00:00:00 2001 From: KUN1007 Date: Thu, 30 Nov 2023 20:58:32 +0800 Subject: [PATCH] BUG fix: login expired --- src/utils/request.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/request.ts b/src/utils/request.ts index 3d7d0597..8a782d25 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -29,7 +29,7 @@ const kunFetchRequest = async ( const newResponseData = await requestRefresh(fullUrl, options) const data: T = await newResponseData.json() return data - } else if (response.status === 233) { + } else if (!response.ok) { // Handle some known backend error await onRequestError(response) return {} as T