Skip to content

Commit

Permalink
fixup! Improve rate limit detecting for GH API
Browse files Browse the repository at this point in the history
  • Loading branch information
Felixoid committed Apr 4, 2024
1 parent 9e4f9cb commit a015ee9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion did/plugins/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def request_data(url, headers):
except requests.exceptions.JSONDecodeError as error:
log.debug(error)
raise ReportError(f"GitHub JSON failed: {response.text}.")
if (response.status_code in (403, 409)
if (response.status_code in (403, 429)
and data.get("message", "").startswith("API rate limit exceeded")):
raise ReportError(
"GitHub API rate limit exceeded. "
Expand Down

0 comments on commit a015ee9

Please sign in to comment.