heroku / heroku-repo

Plugin for heroku CLI that can manipulate the repo
MIT License
686 stars 111 forks source link

fail curl on http errors #58

Closed jdx closed 6 years ago

jdx commented 8 years ago

Makes https://github.com/heroku/heroku-repo/issues/57 and #36 somewhat more obvious of an error.

jdx commented 8 years ago

Thoughts @tt? It shows this error:

curl: (22) The requested URL returned error: 404 Not Found
tt commented 8 years ago

If you create an app or never pushed directly to it (maybe because you're using the GitHub integration), that error is expected.

jdx commented 8 years ago

Right this change makes it so it shows the 404 error. Without this PR it errors with the less obvious: Error: stdin: not in gzip format.

I'm curious if you think the 404 error is sufficient enough to inform the user that the issue is the repo is empty.

tt commented 8 years ago

It would be great if it could provide something more meaningful as I suspect we'll continue to see issues being filed.

How about showing "cache already purged" or something similar that indicates that there is no work to be done?

jdx commented 8 years ago

I'm just not sure how to actually write a script that does that if it's a 404 error

jdx commented 6 years ago

@tt this has come up again because repo:clone is failing out with tar: Unrecognized archive format but it's not possible to tell if this is an http error or something else. I think we should merge this as it's an improvement even if the UX isn't perfect