|
|
@@ -340,12 +340,16 @@ class UnstructuredIngestionProvider(IngestionProvider):
|
|
|
logger.info(
|
|
|
f"Parsing {document.document_type}: {document.id} with fallback parser"
|
|
|
)
|
|
|
- async for element in self.parse_fallback(
|
|
|
- file_content,
|
|
|
- ingestion_config=ingestion_config,
|
|
|
- parser_name=document.document_type,
|
|
|
- ):
|
|
|
- elements.append(element)
|
|
|
+ try:
|
|
|
+ async for element in self.parse_fallback(
|
|
|
+ file_content,
|
|
|
+ ingestion_config=ingestion_config,
|
|
|
+ parser_name=document.document_type,
|
|
|
+ ):
|
|
|
+ elements.append(element)
|
|
|
+ except Exception as e:
|
|
|
+ logger.error(f"Error parsing {document.document_type}: {e}")
|
|
|
+ raise e
|
|
|
else:
|
|
|
logger.info(
|
|
|
f"Parsing {document.document_type}: {document.id} with unstructured"
|