diff --git a/openlibrary/plugins/upstream/account.py b/openlibrary/plugins/upstream/account.py index 31d82fecea0..513dbf50cd7 100644 --- a/openlibrary/plugins/upstream/account.py +++ b/openlibrary/plugins/upstream/account.py @@ -32,7 +32,6 @@ ) from openlibrary.core.observations import Observations from openlibrary.core.ratings import Ratings -from openlibrary.plugins.openlibrary.sentry import sentry from openlibrary.core.follows import PubSub from openlibrary.plugins.recaptcha import recaptcha @@ -326,6 +325,8 @@ def POST(self): ) except OLAuthenticationError as e: f.note = get_login_error(e.__str__()) + from openlibrary.plugins.openlibrary.sentry import sentry + if sentry.enabled: sentry.capture_exception(e)