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.
This commit is contained in:
Stefan Agner 2025-02-27 16:10:13 +01:00
parent c5d4ebcd48
commit 82ef62e7a3
No known key found for this signature in database
GPG Key ID: AE01353D1E44747D

View File

@ -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