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
|
||||
|
||||
## 0.3.13.3
|
||||
|
||||
- Use sentry's set_extra to provide extra debug variables
|
||||
|
||||
## 0.3.13.2
|
||||
|
||||
- Update sentry-sdk
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "newsreader",
|
||||
"version": "0.3.13.2",
|
||||
"version": "0.3.13.3",
|
||||
"description": "Application for viewing RSS feeds",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[tool.poetry]
|
||||
name = "newsreader"
|
||||
version = "0.3.13.2"
|
||||
version = "0.3.13.3"
|
||||
description = "Webapplication for reading RSS feeds"
|
||||
authors = ["Sonny <sonnyba871@gmail.com>"]
|
||||
license = "GPL-3.0"
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ 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
|
||||
|
|
@ -234,11 +235,18 @@ class TwitterClient(PostClient):
|
|||
|
||||
break
|
||||
except StreamDeniedException as e:
|
||||
logger.exception(
|
||||
f"Access token expired for user {stream.rule.user.pk}",
|
||||
extra={"content": e.response.content} if e.response else {},
|
||||
logger.warning(
|
||||
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)
|
||||
|
||||
sentry_sdk.capture_message(
|
||||
"Twitter authentication credentials reset"
|
||||
)
|
||||
|
||||
stream.rule.user.twitter_oauth_token = None
|
||||
stream.rule.user.twitter_oauth_token_secret = None
|
||||
stream.rule.user.save()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue