diff --git a/src/hooks/business/download.ts b/src/hooks/business/download.ts index b3b70c14..357680d9 100644 --- a/src/hooks/business/download.ts +++ b/src/hooks/business/download.ts @@ -113,6 +113,10 @@ export function useDownload() { const response = await fetch(fullUrl, requestOptions); + if (response.status !== 200) { + throw new Error(errorCodeRecord.default); + } + await handleResponse(response); const rawHeader = response.headers.get('Download-Filename');