trellis-cli icon indicating copy to clipboard operation
trellis-cli copied to clipboard

Bug: Error message when rate limited from GitHub should be improved

Open retlehs opened this issue 3 years ago • 0 comments

Description

What's wrong?

When temporarily rate limited from the GitHub API, it's possible that trellis new will fail

Steps To Reproduce

  1. Get yourself rate limited (maybe do several composer install's on a project?)
  2. Run trellis new

Expected Behavior

See an error message that makes it obvious what is occurring

Actual Behavior

~/Sites ❯❯❯ trellis new example.com
Creating new Trellis project in /Users/ben/Sites/example.com

Site domain [example.com]:

✔ example.com
Aborting: error while downloading Trellis
Error deleting the temporary archive path: Could not download file : Get "": unsupported protocol scheme ""
This might just be a network error. Please delete this project folder and try again.

When manually visiting https://api.github.com/repos/roots/trellis/releases/latest (you must know this URL since it's not provided in the error), a more helpful error message is returned:

API rate limit exceeded for 1.2.3.4. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

retlehs avatar Jul 12 '22 18:07 retlehs