aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/http.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/discord/http.py b/discord/http.py
index b103a7ef..4c270895 100644
--- a/discord/http.py
+++ b/discord/http.py
@@ -181,6 +181,10 @@ class HTTPClient:
# we are being rate limited
if r.status == 429:
+ if not isinstance(data, dict):
+ # Banned by Cloudflare more than likely.
+ raise HTTPException(r, data)
+
fmt = 'We are being rate limited. Retrying in %.2f seconds. Handled under the bucket "%s"'
# sleep a bit