mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-16 14:03:43 +08:00
fix: throw error instead of returning empty string when reading file content fails
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user