Set response keyword
This commit is contained in:
parent
9b1408160d
commit
02cbaeb491
2 changed files with 4 additions and 4 deletions
|
|
@ -42,7 +42,9 @@ class ResponseHandler:
|
||||||
stream_exception = StreamException
|
stream_exception = StreamException
|
||||||
|
|
||||||
message = getattr(exception, "message", str(exception))
|
message = getattr(exception, "message", str(exception))
|
||||||
raise stream_exception(exception.response, message=message) from exception
|
raise stream_exception(
|
||||||
|
response=exception.response, message=message
|
||||||
|
) from exception
|
||||||
|
|
||||||
def __exit__(self, *args, **kwargs):
|
def __exit__(self, *args, **kwargs):
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
|
|
@ -242,9 +242,7 @@ class TwitterClient(PostClient):
|
||||||
import sentry_sdk
|
import sentry_sdk
|
||||||
|
|
||||||
with sentry_sdk.push_scope() as scope:
|
with sentry_sdk.push_scope() as scope:
|
||||||
if e.response:
|
|
||||||
scope.set_extra("content", e.response.content)
|
scope.set_extra("content", e.response.content)
|
||||||
|
|
||||||
sentry_sdk.capture_message(
|
sentry_sdk.capture_message(
|
||||||
"Twitter authentication credentials reset"
|
"Twitter authentication credentials reset"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue