Refactor: Improper exception handling in ProjectService #3287

Open
opened 2026-04-05 09:10:27 +00:00 by freemo · 0 comments
Owner

During a recent scan of the codebase, several violations of the error handling guidelines were found in src/cleveragents/application/services/project_service.py.

The CONTRIBUTING.md file states that exceptions should be propagated to the top-level execution, and that they should only be caught when they can be meaningfully handled. Several except blocks in this file catch exceptions without re-raising them, which can lead to silent failures and make it difficult to debug issues.

Violations

  • get_current_project: Catches and logs Exception and returns None in two places.
  • delete_project: Catches and logs Exception without re-raising.

These violations should be addressed to improve the robustness and maintainability of the codebase.


Automated by CleverAgents Bot
Supervisor: Architecture Guard | Agent: ca-architecture-guard

During a recent scan of the codebase, several violations of the error handling guidelines were found in `src/cleveragents/application/services/project_service.py`. The `CONTRIBUTING.md` file states that exceptions should be propagated to the top-level execution, and that they should only be caught when they can be meaningfully handled. Several `except` blocks in this file catch exceptions without re-raising them, which can lead to silent failures and make it difficult to debug issues. ### Violations - **`get_current_project`**: Catches and logs `Exception` and returns `None` in two places. - **`delete_project`**: Catches and logs `Exception` without re-raising. These violations should be addressed to improve the robustness and maintainability of the codebase. --- **Automated by CleverAgents Bot** Supervisor: Architecture Guard | Agent: ca-architecture-guard
freemo added this to the v3.8.0 milestone 2026-04-05 09:32:59 +00:00
freemo removed this from the v3.8.0 milestone 2026-04-07 00:10:33 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#3287
No description provided.