Add warning log for invalid response in Twitch.py
Log a warning when the response from load_channel_points_context is invalid, instead of raising an exception.
This commit is contained in:
@@ -674,7 +674,8 @@ class Twitch(object):
|
||||
response = self.post_gql_request(json_data)
|
||||
if response != {}:
|
||||
if "data" not in response or response["data"] is None:
|
||||
raise StreamerDoesNotExistException
|
||||
logger.warning(f"Invalid response from load_channel_points_context for {streamer.username}: {response}")
|
||||
return
|
||||
if response["data"]["community"] is None:
|
||||
raise StreamerDoesNotExistException
|
||||
channel = response["data"]["community"]["channel"]
|
||||
|
||||
Reference in New Issue
Block a user