From cc1162b2591fb3641f3e339af4a5ee72b117f50f Mon Sep 17 00:00:00 2001 From: hanqin Date: Tue, 21 Apr 2026 16:07:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B8=B8=E6=88=8F=E7=AB=AF40?= =?UTF-8?q?4=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Build_God_Game/src/api/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Build_God_Game/src/api/index.ts b/Build_God_Game/src/api/index.ts index a763238..066031e 100644 --- a/Build_God_Game/src/api/index.ts +++ b/Build_God_Game/src/api/index.ts @@ -29,6 +29,10 @@ instance.interceptors.response.use( } if (error.response?.status === 404) { window.location.href = "/404"; + return Promise.reject(error) + } + if (error.code === 'ERR_NETWORK' || error.code === 'ECONNABORTED' || !error.response) { + return Promise.reject(error) } const responseData = error.response?.data; if (typeof responseData === "string") {