From 836d27bfdd04fd2057baef5763d6d320dd6a6b2f Mon Sep 17 00:00:00 2001 From: "mendral-app[bot]" <233154221+mendral-app[bot]@users.noreply.github.com> Date: Wed, 10 Jun 2026 12:51:34 -0700 Subject: [PATCH] fix: add KeyError and AttributeError to ignored Sentry exceptions KeyError and AttributeError are normal control-flow exceptions in Python (EAFP pattern, dict-like __getitem__, hasattr/getattr). They should not be reported to Sentry by the sys.settrace handler. This eliminates false-positive KeyError reports from dict-like model classes (e.g. DriveMountInfo.__getitem__) during test runs. --- src/blaxel/core/common/sentry.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/blaxel/core/common/sentry.py b/src/blaxel/core/common/sentry.py index d2538820..e2ed9d27 100644 --- a/src/blaxel/core/common/sentry.py +++ b/src/blaxel/core/common/sentry.py @@ -36,6 +36,8 @@ KeyboardInterrupt, # User interrupt (Ctrl+C) SystemExit, # Program exit CancelledError, # Async task cancellation + KeyError, # Normal control flow for dict-like __getitem__ + AttributeError, # Normal control flow for hasattr/getattr patterns ) # Optional dependencies that may not be installed - import errors for these are expected