mirror of
https://github.com/RGBCube/GitHubWrapper
synced 2025-05-29 12:15:12 +00:00
Fix ratelimits not getting updated when the request is successful
This commit is contained in:
parent
ac3f888853
commit
7b4b364beb
1 changed files with 3 additions and 2 deletions
|
@ -174,8 +174,6 @@ class HTTPClient:
|
|||
async with self.__session.request(
|
||||
method, f"https://api.github.com{path}", **kwargs
|
||||
) as request:
|
||||
if 200 <= request.status <= 299:
|
||||
return await request.json()
|
||||
|
||||
headers = request.headers
|
||||
|
||||
|
@ -189,6 +187,9 @@ class HTTPClient:
|
|||
datetime.now(timezone.utc),
|
||||
)
|
||||
|
||||
if 200 <= request.status <= 299:
|
||||
return await request.json()
|
||||
|
||||
raise error_from_request(request)
|
||||
|
||||
# === ROUTES === #
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue