luisoala commited on
Commit
b2a09fd
Β·
1 Parent(s): a9775df
__pycache__/validation.cpython-310.pyc ADDED
Binary file (4.96 kB). View file
 
__pycache__/validation.cpython-311.pyc ADDED
Binary file (10.7 kB). View file
 
validation.py CHANGED
@@ -90,17 +90,17 @@ def validate_records(json_data):
90
  results.append(f"βœ… Record set '{record_set.uuid}' passed validation.")
91
  except func_timeout.exceptions.FunctionTimedOut:
92
  warning_msgs = [str(w.message) for w in record_warnings]
93
- error_message = f"❌ Record set '{record_set.uuid}' generation took too long (>300s)"
94
  if warning_msgs:
95
- error_message += "\n\nWarnings:\n" + "\n".join(warning_msgs)
96
- return False, error_message
97
  except Exception as e:
98
  warning_msgs = [str(w.message) for w in record_warnings]
99
  error_details = traceback.format_exc()
100
- error_message = f"❌ Record set '{record_set.uuid}' failed: {str(e)}\n\n{error_details}"
101
  if warning_msgs:
102
- error_message += "\n\nWarnings:\n" + "\n".join(warning_msgs)
103
- return False, error_message
104
 
105
  # Add any warnings from the initial setup
106
  warning_msgs = [str(w.message) for w in caught_warnings]
@@ -115,7 +115,7 @@ def validate_records(json_data):
115
  except Exception as e:
116
  warning_msgs = [str(w.message) for w in caught_warnings]
117
  error_details = traceback.format_exc()
118
- error_message = f"❌ Unexpected error during records validation: {str(e)}\n\n{error_details}"
119
  if warning_msgs:
120
  error_message += "\n\nWarnings:\n" + "\n".join(warning_msgs)
121
- return False, error_message
 
90
  results.append(f"βœ… Record set '{record_set.uuid}' passed validation.")
91
  except func_timeout.exceptions.FunctionTimedOut:
92
  warning_msgs = [str(w.message) for w in record_warnings]
93
+ msg = f"⚠️ Record set '{record_set.uuid}' generation took too long (>300s)"
94
  if warning_msgs:
95
+ msg += "\n\nWarnings:\n" + "\n".join(warning_msgs)
96
+ results.append(msg)
97
  except Exception as e:
98
  warning_msgs = [str(w.message) for w in record_warnings]
99
  error_details = traceback.format_exc()
100
+ msg = f"⚠️ Record set '{record_set.uuid}' encountered an issue: {str(e)}\n\n{error_details}"
101
  if warning_msgs:
102
+ msg += "\n\nWarnings:\n" + "\n".join(warning_msgs)
103
+ results.append(msg)
104
 
105
  # Add any warnings from the initial setup
106
  warning_msgs = [str(w.message) for w in caught_warnings]
 
115
  except Exception as e:
116
  warning_msgs = [str(w.message) for w in caught_warnings]
117
  error_details = traceback.format_exc()
118
+ error_message = f"⚠️ Unexpected error during records validation: {str(e)}\n\n{error_details}"
119
  if warning_msgs:
120
  error_message += "\n\nWarnings:\n" + "\n".join(warning_msgs)
121
+ return True, error_message