From 82ef62e7a3c2455619f421fcb04a05dacd1eee3f Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 27 Feb 2025 16:10:13 +0100 Subject: [PATCH] Fix early Sentry reporting If an exception occures between when Sentry gets initialized and the Supervisor state is first set to INITIALIZED (which is only later the case in `coresys.core.connect()`), the error filtering tries to collect context which is not ready yet. Make sure that we exit filtering early just like in the INITIALIZED state. --- supervisor/misc/filter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supervisor/misc/filter.py b/supervisor/misc/filter.py index 796072422..5443b1f47 100644 --- a/supervisor/misc/filter.py +++ b/supervisor/misc/filter.py @@ -60,7 +60,7 @@ def filter_data(coresys: CoreSys, event: dict, hint: dict) -> dict: ) # Not full startup - missing information - if coresys.core.state in (CoreState.INITIALIZE, CoreState.SETUP): + if coresys.core.state in (None, CoreState.INITIALIZE, CoreState.SETUP): return event # List installed addons