From ef2a36274d99adbbb39e1d38d7285a5f269ee93b Mon Sep 17 00:00:00 2001 From: xiaocp2009 <39615122+xiaocp2009@users.noreply.github.com> Date: Wed, 29 Oct 2025 11:23:15 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E8=A1=A5=E5=85=85=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86=202=E3=80=81=E5=AD=97?= =?UTF-8?q?=E5=85=B8=E6=9E=9A=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cds-fontend-2025.V1/src/enum/index.ts | 3 ++- cds-fontend-2025.V1/src/hooks/business/download.ts | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cds-fontend-2025.V1/src/enum/index.ts b/cds-fontend-2025.V1/src/enum/index.ts index a803154..7b6c20a 100644 --- a/cds-fontend-2025.V1/src/enum/index.ts +++ b/cds-fontend-2025.V1/src/enum/index.ts @@ -4,5 +4,6 @@ export enum SetupStoreId { Auth = 'auth-store', Route = 'route-store', Tab = 'tab-store', - Notice = 'notice-store' + Notice = 'notice-store', + Dict = 'dict-store' } diff --git a/cds-fontend-2025.V1/src/hooks/business/download.ts b/cds-fontend-2025.V1/src/hooks/business/download.ts index cc85fef..6111f18 100644 --- a/cds-fontend-2025.V1/src/hooks/business/download.ts +++ b/cds-fontend-2025.V1/src/hooks/business/download.ts @@ -116,6 +116,10 @@ export function useDownload() { const response = await fetch(fullUrl, requestOptions); + if (response.status !== 200) { + throw new Error(errorCodeRecord.default); + } + await handleResponse(response); const finalFilename = filename || response.headers.get('Download-Filename') || `download-${timestamp}`;