Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion githubkit/graphql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ def parse_graphql_response(
# https://docs.github.com/en/graphql/overview/rate-limits-and-node-limits-for-the-graphql-api#exceeding-the-rate-limit
# x-ratelimit-remaining may not be 0, ignore it
# https://github.com/octokit/plugin-throttling.js/pull/636
if any(error.type == "RATE_LIMITED" for error in response_data.errors):
# error.type may be RATE_LIMIT or RATE_LIMITED
# https://github.com/yanyongyu/githubkit/issues/271
# https://github.com/octokit/plugin-throttling.js/issues/824
if any(
error.type in ("RATE_LIMIT", "RATE_LIMITED")
for error in response_data.errors
):
raise PrimaryRateLimitExceeded(
response, self._github._extract_retry_after(response)
)
Expand Down
Loading