0.3.13.3
This commit is contained in:
parent
0241de95cd
commit
e008d2f53c
4 changed files with 17 additions and 5 deletions
|
|
@ -1,5 +1,9 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.3.13.3
|
||||||
|
|
||||||
|
- Use sentry's set_extra to provide extra debug variables
|
||||||
|
|
||||||
## 0.3.13.2
|
## 0.3.13.2
|
||||||
|
|
||||||
- Update sentry-sdk
|
- Update sentry-sdk
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "newsreader",
|
"name": "newsreader",
|
||||||
"version": "0.3.13.2",
|
"version": "0.3.13.3",
|
||||||
"description": "Application for viewing RSS feeds",
|
"description": "Application for viewing RSS feeds",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "newsreader"
|
name = "newsreader"
|
||||||
version = "0.3.13.2"
|
version = "0.3.13.3"
|
||||||
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"
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ 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
|
||||||
|
|
@ -234,11 +235,18 @@ class TwitterClient(PostClient):
|
||||||
|
|
||||||
break
|
break
|
||||||
except StreamDeniedException as e:
|
except StreamDeniedException as e:
|
||||||
logger.exception(
|
logger.warning(
|
||||||
f"Access token expired for user {stream.rule.user.pk}",
|
f"Access token expired for user {stream.rule.user.pk}"
|
||||||
extra={"content": e.response.content} if e.response else {},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
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"
|
||||||
|
)
|
||||||
|
|
||||||
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
|
||||||
stream.rule.user.save()
|
stream.rule.user.save()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue