Skip to content

Commit da1db80

Browse files
webarch-aigudivt
authored andcommitted
Updated assessment error handling
1 parent 3e49325 commit da1db80

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/idp_common_pkg/idp_common/assessment/granular_service.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,10 @@ def _process_assessment_task(
738738
logger.warning(
739739
f"Failed to extract geometry data for task {task.task_id}: {str(e)}"
740740
)
741+
task_failed = True
742+
error_messages.append(
743+
f"Failed to extract geometry data for task {task.task_id}"
744+
)
741745
# Continue with assessment even if geometry extraction fails
742746

743747
# Check for confidence threshold alerts
@@ -1015,6 +1019,7 @@ def _get_text_confidence_data(self, page) -> str:
10151019
f"Failed to generate text confidence data for page {page.page_id}: {str(e)}"
10161020
)
10171021
raise
1022+
10181023
return ""
10191024

10201025
def _convert_bbox_to_geometry(
@@ -1091,6 +1096,8 @@ def _process_single_assessment_geometry(
10911096
f"Failed to process bounding box for {attr_name}: {str(e)}"
10921097
)
10931098
raise
1099+
1100+
10941101
else:
10951102
# If only one of bbox/page exists, log a warning about incomplete data
10961103
if "bbox" in attr_assessment and "page" not in attr_assessment:
@@ -1492,6 +1499,7 @@ def process_document_section(self, document: Document, section_id: str) -> Docum
14921499
logger.error(error_msg)
14931500
document.status = Status.FAILED
14941501
document.errors.append(error_msg)
1502+
14951503
return document
14961504

14971505
def assess_document(self, document: Document) -> Document:

0 commit comments

Comments
 (0)