mirror of
https://github.com/ShayManor/github-readme-stats.git
synced 2026-12-02 11:53:48 +05:30
feat(launch): friendly GitHub-limit message on Generate; document the score formula
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -87,6 +87,10 @@ def get_data(username: str):
|
||||
t0 = time.monotonic()
|
||||
try:
|
||||
data = github.fetch_github_data(username, token=config.GITHUB_PAT)
|
||||
except github.GitHubTransientError as e:
|
||||
analytics.record_fetch(username, 503, int((time.monotonic() - t0) * 1000))
|
||||
log.warning("github fetch rate-limited for %s: %s", username, e)
|
||||
return jsonify({"error": "github_rate_limited"}), 503
|
||||
except Exception:
|
||||
analytics.record_fetch(username, 502, int((time.monotonic() - t0) * 1000))
|
||||
log.exception("github fetch failed for %s", username)
|
||||
|
||||
Reference in New Issue
Block a user