mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2026-04-27 13:34:25 +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();
|
return await response.text();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error reading file content:", error);
|
console.error("Error reading file content:", error);
|
||||||
return "";
|
throw error;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user