Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(ui): avoid duplicate Sentry error events

cyh89ecd5fdcf50
diff --git a/tests/test_sentry_integration.py b/tests/test_sentry_integration.py
index 828ee9b58..5e9637eff 100644
--- a/tests/test_sentry_integration.py
+++ b/tests/test_sentry_integration.py
@@ -3,6 +3,7 @@ from __future__ import annotations
import sys
import types
import importlib
+import ast
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
@@ -156,6 +157,23 @@ def test_run_ui_server_skips_sentry_when_config_load_fails(monkeypatch):
assert sentry_calls == []
+def test_ui_error_handler_does_not_explicitly_capture_exceptions():
+ source = Path("vibe/ui_server.py").read_text(encoding="utf-8")
+ module = ast.parse(source)
+
+ handle_exception = next(
+ node for node in module.body if isinstance(node, ast.FunctionDef) and node.name == "handle_exception"
+ )
+
+ calls_capture_exception = False
+ for node in ast.walk(handle_exception):
+ if isinstance(node, ast.Call) and isinstance(node.func, ast.Name) and node.func.id == "capture_exception":
+ calls_capture_exception = True
+ break
+
+ assert calls_capture_exception is False
+
+
def test_scrub_data_redacts_sensitive_values():
event = {
"request": {
diff --git a/vibe/ui_server.py b/vibe/ui_server.py
index bd5a4835e..656703ea3 100644
--- a/vibe/ui_server.py
+++ b/vibe/ui_server.py
@@ -12,7 +12,7 @@ from flask import Flask, request, jsonify, send_file, Response
from config import paths
from config.v2_config import V2Config
from vibe.runtime import get_ui_dist_path, get_working_dir
-from vibe.sentry_integration import capture_exception, init_sentry
+from vibe.sentry_integration import init_sentry
logger = logging.getLogger(__name__)
@@ -65,7 +65,6 @@ def handle_exception(e):
return jsonify({"error": e.description}), e.code
# Log and return 500 for unexpected server errors
- capture_exception(e)
logger.exception("Unhandled exception in UI server")
return jsonify({"error": str(e)}), 500