Mostly ignore instances of "server error"
This commit is contained in:
1 parent
44e6e09119
commit
cd4eeeeab2
1 file changed
+8
@@ -1307,6 +1307,14 @@ class Twitch:
|
|||||||
delay = 5
|
delay = 5
|
||||||
force_retry = True
|
force_retry = True
|
||||||
break
|
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 (
|
elif (
|
||||||
error_dict["message"] in (
|
error_dict["message"] in (
|
||||||
"service timeout",
|
"service timeout",
|
||||||
|
|||||||
Reference in new issue
Block a user