Skip to content
Snippets Groups Projects
Unverified Commit d24d3d1e authored by Alex Yang's avatar Alex Yang Committed by GitHub
Browse files

fix: print warning when llama parse reader has error (#1230)

parent 5c4badbc
No related branches found
No related tags found
No related merge requests found
---
"@llamaindex/cloud": patch
---
fix: print warning when llama parse reader has error
......@@ -403,6 +403,7 @@ export class LlamaParseReader extends FileReader {
})
.catch((error) => {
if (this.ignoreErrors) {
console.warn(`Error while parsing the file: ${error.message}`);
return [];
} else {
throw error;
......@@ -437,8 +438,8 @@ export class LlamaParseReader extends FileReader {
resultJson.file_path = isFilePath ? filePathOrContent : undefined;
return [resultJson];
} catch (e) {
console.error(`Error while parsing the file under job id ${jobId}`, e);
if (this.ignoreErrors) {
console.error(`Error while parsing the file under job id ${jobId}`, e);
return [];
} else {
throw e;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment