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:
Roman Davydov
2026-07-16 13:35:56 +03:00
committed by GitHub
parent 80e0af5892
commit e57ad37ecd
+2 -1
View File
@@ -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"]