Skip to content

Commit

Permalink
Fix circular import
Browse files Browse the repository at this point in the history
  • Loading branch information
EricTendian committed Sep 22, 2024
1 parent 8c486b0 commit d1e9986
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/utils/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import os
from sentry_sdk.types import Event, Hint

from app.whisper.exceptions import WhisperException


class BaseException(Exception): ...


def before_send(event: Event, hint: Hint):
exc_type, exc_value, tb = hint.get("exc_info", [None, None, None])
if exc_type == WhisperException:
# We need to do the comparison like this to avoid a circular import error
if "WhisperException" in str(exc_type):
return None
if os.getenv("S3_PUBLIC_URL", "") in str(
exc_value
Expand Down

0 comments on commit d1e9986

Please sign in to comment.