Raise exception on spreadsheet errors instead of silently skipping #4
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user