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
## 0.3.13.4
- Fix import error
## 0.3.13.3
- Use sentry's set_extra to provide extra debug variables

View file

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

View file

@ -1,6 +1,6 @@
[tool.poetry]
name = "newsreader"
version = "0.3.13.3"
version = "0.3.13.4"
description = "Webapplication for reading RSS feeds"
authors = ["Sonny <sonnyba871@gmail.com>"]
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 _
import pytz
import sentry_sdk
from ftfy import fix_text
from requests_oauthlib import OAuth1 as OAuth
@ -239,6 +238,9 @@ class TwitterClient(PostClient):
f"Access token expired for user {stream.rule.user.pk}"
)
try:
import sentry_sdk
with sentry_sdk.push_scope() as scope:
if e.response:
scope.set_extra("content", e.response.content)
@ -246,6 +248,8 @@ class TwitterClient(PostClient):
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