添加多层错误保护: 1. 在整个查询函数外层添加try-except 2. 在每行数据处理时也添加try-except 3. 出错时返回空数组而不是抛出异常 4. 打印详细的错误信息和堆栈跟踪 这样即使数据有问题,也不会导致500错误, 而是会正常返回空列表并在日志中显示具体错误。 位置: database.py 第1661-1695行 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
58 KiB
Executable File
58 KiB
Executable File