Add traceback logging for extraction errors

This commit is contained in:
_Yusaki 2026-03-13 19:19:22 +07:00
parent db6e235b98
commit b4c7f67b00

View file

@ -122,7 +122,9 @@ class LLMGraphBuilderService:
except Exception as e:
fail_count += 1
last_error = e
logger.error(f"Chunk {i+1} extraction failed: {e}")
import traceback
logger.error(f"Chunk {i+1} extraction failed: {type(e).__name__}: {e}")
logger.error(f"Chunk {i+1} traceback: {traceback.format_exc()}")
if progress_callback:
progress_callback(f"Chunk {i+1} error: {e}", (i + 1) / total)