Skip to content

🧹 Code Health: Fix bare excepts in history store#666

Open
madara88645 wants to merge 4 commits into
mainfrom
fix-bare-excepts-history-store-942329263870783316
Open

🧹 Code Health: Fix bare excepts in history store#666
madara88645 wants to merge 4 commits into
mainfrom
fix-bare-excepts-history-store-942329263870783316

Conversation

@madara88645
Copy link
Copy Markdown
Owner

🎯 What: Replaced bare except Exception: blocks with properly logged exceptions (except Exception as e: logger.error(...)) in app/rag/history_store.py.
💡 Why: Bare excepts hide errors and make debugging extremely difficult. Using the logging module properly captures exceptions, making the system more maintainable and observable without altering the program flow.
Verification: Verified changes by visually inspecting the updated file, ensuring fallback behavior remains identical. Ran the full backend test suite (python -m pytest tests/), ensuring 100% pass rate with no broken functionality.
Result: Improved code readability, safety, and operational observability by removing anti-patterns from the RAGHistoryStore component.


PR created automatically by Jules for task 942329263870783316 started by @madara88645

Replaced bare `except Exception:` blocks with `except Exception as e:` and logged the errors using the `logging` module to improve observability and code health in `app/rag/history_store.py`.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
compiler Building Building Preview, Comment May 31, 2026 11:06am

Copilot AI review requested due to automatic review settings May 29, 2026 10:42
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Replaced bare `except Exception:` blocks with `except Exception as e:` and logged the errors using the `logging` module to improve observability and code health in `app/rag/history_store.py`.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Replaced bare `except Exception:` blocks with `except Exception as e:` and logged the errors using the `logging` module to improve observability and code health in `app/rag/history_store.py`.
@madara88645
Copy link
Copy Markdown
Owner Author

Not merged in this batch: branch has conflicts with main. Please rebase onto the latest main and I'll re-evaluate next pass.

@google-labs-jules
Copy link
Copy Markdown
Contributor

Not merged in this batch: branch has conflicts with main. Please rebase onto the latest main and I'll re-evaluate next pass.

I have successfully rebased the branch onto the latest main branch, resolved the merge conflicts, and verified that all tests and linting still pass. The PR is clean and only contains the intended fix for bare exceptions in app/rag/history_store.py.

Replaced bare `except Exception:` blocks with `except Exception as e:` and logged the errors using the `logging` module to improve observability and code health in `app/rag/history_store.py`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants