mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-27 21:56:38 +08:00
fix: throw error instead of returning empty string when reading file content fails
This commit is contained in:
parent
32045e98b4
commit
e86a39047c
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user