Mostly ignore instances of "server error"

This commit is contained in:
DevilXD
2025-06-21 18:44:38 +02:00
parent 44e6e09119
commit cd4eeeeab2

View File

@@ -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",