Merge pull request 'Raise exception on spreadsheet errors instead of silently skipping' (#4) from fix/validate-spreadsheet-decision-data into main
All checks were successful
Build Docker Image / build (push) Successful in 44s

Reviewed-on: #4
This commit is contained in:
cal 2026-02-06 13:55:52 +00:00
commit 0ed0446607
2 changed files with 13 additions and 5 deletions

View File

@ -1 +1 @@
2.29.4
2.29.5

View File

@ -315,11 +315,19 @@ class SheetsService:
# Check for spreadsheet errors
if self._is_spreadsheet_error(value):
self.logger.warning(
f"Row {row_num}: Spreadsheet error '{value}' in field '{field_name}' - skipping row"
raise SheetsException(
f"❌ Spreadsheet Error Detected\n\n"
f"**Location:** Row {row_num}, Column '{field_name}'\n"
f"**Value Found:** `{value}`\n\n"
f"This cell contains a formula error that must be fixed before submission.\n\n"
f"**Common Error Types:**\n"
f"• `#REF!` - Invalid cell reference (deleted row/column)\n"
f"• `#N/A` - Lookup formula couldn't find a match\n"
f"• `#VALUE!` - Wrong data type in formula\n"
f"• `#DIV/0!` - Division by zero\n"
f"• `#NAME?` - Unrecognized formula name\n\n"
f"**Action Required:** Fix cell {field_name} in row {row_num} and resubmit."
)
has_error = True
break
# Sanitize integer fields
if field_name in int_fields: