From e86a39047cf5dadf05f4747127189d7b27f9d35c Mon Sep 17 00:00:00 2001 From: dakai Date: Sun, 6 Oct 2024 15:55:19 +0800 Subject: [PATCH] fix: throw error instead of returning empty string when reading file content fails --- app/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils.ts b/app/utils.ts index 2d0343a36..c7664f171 100644 --- a/app/utils.ts +++ b/app/utils.ts @@ -35,7 +35,7 @@ export const readFileContent = async (file: UploadFile): Promise => { return await response.text(); } catch (error) { console.error("Error reading file content:", error); - return ""; + throw error; } };