mirror of
https://github.com/rangermix/TwitchDropsMiner.git
synced 2026-06-02 10:29:37 +00:00
Detect and report GQL errors as exceptions
This commit is contained in:
@@ -916,6 +916,8 @@ class Twitch:
|
||||
) as response:
|
||||
response_json: JsonType = await response.json()
|
||||
gql_logger.debug(f"GQL Response: {response_json}")
|
||||
if "errors" in response_json and response_json["errors"]:
|
||||
raise MinerException(f"GQL error: {response_json['errors']}")
|
||||
return response_json
|
||||
|
||||
async def fetch_campaign(
|
||||
|
||||
Reference in New Issue
Block a user