BUG: Silent Exceptions in Backend Initialization Are Not Logged

未关闭
#259 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@dolliecoder 已经在做这个了。

开始于 2026年2月3日。

  • #263 来自 @dolliecoder —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
python

调研方向

从 backend/app/database/falkor/code-graph-backend/api/graph.py 开始,在初始化和设置路径中搜索每个 except Exception: pass。检查周围的索引和服务组件设置,然后模拟一次失败,例如数据库或索引创建失败。完成的标准是:这些失败会输出带有上下文的描述性 Python logging 消息,而不是保持静默。

由索引模型根据 Issue 内容生成。

描述

Is there an existing issue for this?
  • I have searched the existing issues
What happened?

📌 Issue Overview

There are several places in the backend where exceptions are being "swallowed" (ignored) by using except Exception: pass. This pattern is used, for example, when setting up database indices or initializing service components. When an error occurs within these try blocks, no message is printed or logged, and the backend continues running as if nothing is wrong—even though some features may break or behave unpredictably.

Location:
Most notably found in files under:

  • backend/app/database/falkor/code-graph-backend/api/graph.py

🔍 Steps to Reproduce

  1. Open the Python file in backend/app/database/falkor/code-graph-backend/ api/graph.py
  2. Search for except Exception: pass
  3. Trigger or simulate an error inside one of these try blocks (e.g., fail a database/index creation)
  4. Check the logs — notice that no error is recorded and the application continues running silently

🎯 Expected Behavior

All exceptions during initialization and setup should be logged using Python’s logging module with descriptive messages and context

🚨 Actual Behavior

Exceptions raised during backend initialization or setup are silently ignored due to except Exception: pass.
No logs or error messages are generated, allowing failures to go unnoticed.

📷 Screenshot

💡 Suggested Improvements

try:
self.g.create_node_range_index("File", "name", "ext")
except Exception as exc:
logging.error(f"Failed to create node range index: {exc}")

Record
  • I agree to follow this project's Code of Conduct
  • I want to work on this issue
主要语言
Python
星标
103
派生
143
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

AOSSIE-Org/Devr.AI 的其他 Issue

查看 AOSSIE-Org/Devr.AI 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。