fix: throw error instead of returning empty string when reading file content fails

This commit is contained in:
dakai 2024-10-06 15:55:19 +08:00
parent 32045e98b4
commit e86a39047c
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ export const readFileContent = async (file: UploadFile): Promise<string> => {
return await response.text();
} catch (error) {
console.error("Error reading file content:", error);
return "";
throw error;
}
};