From cd4eeeeab26ab8f957cebb74dc4a0f512140ab1c Mon Sep 17 00:00:00 2001 From: DevilXD <4180725+DevilXD@users.noreply.github.com> Date: Sat, 21 Jun 2025 18:44:38 +0200 Subject: [PATCH] Mostly ignore instances of "server error" --- twitch.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/twitch.py b/twitch.py index 65f5a1b..c8cdc7e 100644 --- a/twitch.py +++ b/twitch.py @@ -1307,6 +1307,14 @@ class Twitch: delay = 5 force_retry = True break + elif error_dict["message"] == "server error": + # nullify the key the error path points to + data_dict: JsonType = response_json["data"] + path: list[str] = error_dict.get("path", []) + for key in path[:-1]: + data_dict = data_dict[key] + data_dict[path[-1]] = None + break elif ( error_dict["message"] in ( "service timeout",