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();
|
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;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue