Merge pull request #149 from plastic-labs/rajat/fix-type-check

bugfix: avoid runtime NameError by using string annotations for Event and Hint
This commit is contained in:
Rajat Ahuja 2025-06-30 15:10:25 -04:00 committed by GitHub
commit e2e6ed94ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ async def setup_admin_jwt():
SENTRY_ENABLED = settings.SENTRY.ENABLED
if SENTRY_ENABLED:
def before_send(event: Event, hint: Hint) -> Event | None:
def before_send(event: "Event", hint: "Hint") -> "Event | None":
if "exc_info" in hint:
_, exc_value, _ = hint["exc_info"]
# Filter out HonchoExceptions from being sent to Sentry