Changed code to support older Python versions

This commit is contained in:
Malasaur 2025-12-01 23:27:09 +01:00
parent eb92d2d36f
commit 582458cdd0
5027 changed files with 794942 additions and 4 deletions

View file

@ -0,0 +1,18 @@
import sentry_sdk
from sentry_sdk.integrations.typer import TyperIntegration
from .auth import is_logged_in
SENTRY_DSN = "https://230250605ea4b58a0b69c768e9ec1168@o4506985151856640.ingest.us.sentry.io/4508449198899200"
def init_sentry() -> None:
"""Initialize Sentry error tracking only if user is logged in."""
if not is_logged_in():
return
sentry_sdk.init(
dsn=SENTRY_DSN,
integrations=[TyperIntegration()],
send_default_pii=False,
)