fix: surface GitHub API rate limit errors in install scripts with VPN suggestion#343
Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Open
Conversation
… suggestion Previously, when the GitHub API returned a rate limit error, the install scripts would fail silently (the grep for browser_download_url would find nothing, resulting in an empty download URL and a confusing error or silent failure). Now all three scripts that call the GitHub API explicitly check for rate limit errors and display a clear message suggesting the user turn off their VPN. Co-Authored-By: Alec Fong <alecsanf@usc.edu>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When the GitHub API returns a rate limit error during CLI installation, the install scripts previously failed silently — the
grepforbrowser_download_urlwould match nothing,DOWNLOAD_URLwould be empty, and the user would either get a confusing "Could not find release" error (install-latest.sh) or a completely silent failure (install-latest-linux.sh).This PR stores the API response in a variable first, checks it for the
"API rate limit exceeded"string, and if detected:bin/install-latest.shandbin/install-latest-linux.sh: Exit with a clear error message and a suggestion to turn off VPN.scripts/install-agent-skill.sh: Warns but continues (since skill files are already downloaded at that point; only.versionresolution is skipped).Additionally, the generic "Could not find release" fallback in both install scripts now dumps the raw API response to stderr for easier debugging of other unexpected API failures.
Review & Testing Checklist for Human
grep -q "API rate limit exceeded"against the raw JSON body. Confirm this matches the actual GitHub API error message (e.g.,{"message":"API rate limit exceeded for ...","documentation_url":"..."}). If GitHub changes the wording, the check silently becomes a no-op (falls through to old behavior).install-agent-skill.shonly warns on rate limit (doesn't abort) since it only affects.versionresolution. Confirm this is the desired UX — a user might not notice the warning if there's lots of output.Notes
Link to Devin session: https://app.devin.ai/sessions/865ae722ee8243c08d80b2bb8d639599
Requested by: @theFong