This commit is contained in:
Sonny Bakker 2021-04-24 20:09:06 +02:00
parent e008d2f53c
commit 8af8dab6db
4 changed files with 17 additions and 9 deletions

View file

@ -1,5 +1,9 @@
# Changelog # Changelog
## 0.3.13.4
- Fix import error
## 0.3.13.3 ## 0.3.13.3
- Use sentry's set_extra to provide extra debug variables - Use sentry's set_extra to provide extra debug variables

View file

@ -1,6 +1,6 @@
{ {
"name": "newsreader", "name": "newsreader",
"version": "0.3.13.3", "version": "0.3.13.4",
"description": "Application for viewing RSS feeds", "description": "Application for viewing RSS feeds",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View file

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "newsreader" name = "newsreader"
version = "0.3.13.3" version = "0.3.13.4"
description = "Webapplication for reading RSS feeds" description = "Webapplication for reading RSS feeds"
authors = ["Sonny <sonnyba871@gmail.com>"] authors = ["Sonny <sonnyba871@gmail.com>"]
license = "GPL-3.0" license = "GPL-3.0"

View file

@ -11,7 +11,6 @@ from django.utils.html import format_html, urlize
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
import pytz import pytz
import sentry_sdk
from ftfy import fix_text from ftfy import fix_text
from requests_oauthlib import OAuth1 as OAuth from requests_oauthlib import OAuth1 as OAuth
@ -239,13 +238,18 @@ class TwitterClient(PostClient):
f"Access token expired for user {stream.rule.user.pk}" f"Access token expired for user {stream.rule.user.pk}"
) )
with sentry_sdk.push_scope() as scope: try:
if e.response: import sentry_sdk
scope.set_extra("content", e.response.content)
sentry_sdk.capture_message( with sentry_sdk.push_scope() as scope:
"Twitter authentication credentials reset" 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 = None
stream.rule.user.twitter_oauth_token_secret = None stream.rule.user.twitter_oauth_token_secret = None