fix error when being rate limited
This commit is contained in:
parent
66e41ab53d
commit
ce263b23f4
@ -1,7 +1,8 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
import httpx
|
||||
import json
|
||||
|
||||
import httpx
|
||||
from django.conf import settings
|
||||
from django.utils import timezone
|
||||
from asgiref.sync import sync_to_async
|
||||
@ -36,6 +37,8 @@ class GuildsView(View):
|
||||
)
|
||||
guild_data = response.json()
|
||||
|
||||
if "retry_after" in guild_data:
|
||||
return JsonResponse(guild_data, safe=False)
|
||||
|
||||
# guilds where the user either administrates or owns
|
||||
cleaned_guild_data = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user