0.3.13.4
This commit is contained in:
parent
e008d2f53c
commit
8af8dab6db
4 changed files with 17 additions and 9 deletions
|
|
@ -11,7 +11,6 @@ from django.utils.html import format_html, urlize
|
|||
from django.utils.translation import ugettext as _
|
||||
|
||||
import pytz
|
||||
import sentry_sdk
|
||||
|
||||
from ftfy import fix_text
|
||||
from requests_oauthlib import OAuth1 as OAuth
|
||||
|
|
@ -239,13 +238,18 @@ class TwitterClient(PostClient):
|
|||
f"Access token expired for user {stream.rule.user.pk}"
|
||||
)
|
||||
|
||||
with sentry_sdk.push_scope() as scope:
|
||||
if e.response:
|
||||
scope.set_extra("content", e.response.content)
|
||||
try:
|
||||
import sentry_sdk
|
||||
|
||||
sentry_sdk.capture_message(
|
||||
"Twitter authentication credentials reset"
|
||||
)
|
||||
with sentry_sdk.push_scope() as scope:
|
||||
if e.response:
|
||||
scope.set_extra("content", e.response.content)
|
||||
|
||||
sentry_sdk.capture_message(
|
||||
"Twitter authentication credentials reset"
|
||||
)
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
stream.rule.user.twitter_oauth_token = None
|
||||
stream.rule.user.twitter_oauth_token_secret = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue