ReconfigureIO / reco

A command line tool for interacting with Reconfigure.io services
Apache License 2.0
6 stars 3 forks source link

interpret the error returned from request.go #21

Closed CampGareth closed 6 years ago

CampGareth commented 6 years ago

Request.go generates a generic "Not Found" error when it gets a 404 from the API. We pass that back up the chain and report it to the user. That error could be a lot more specific if we interpret it at a level where we know what it was we were trying to access. This PR adds that interpreter at the command level so we can say 'deployment not found'.

CampGareth commented 6 years ago

Better error messages when a deployment isn't found

CampGareth commented 6 years ago

Travis is marking this PR as failed because Travis is talking to github too much. It can be ignored for now, but I wonder if there's a way to rewrite that failing test so it doesn't talk to external services (since that's bad etiquette).

error message:

--- FAIL: TestLatestRelease (0.07s)
    update_test.go:13: GET https://api.github.com/repos/ReconfigureIO/reco/releases/latest: 403 API rate limit exceeded for 52.3.55.28. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.) [rate reset in 33m49s]
    update_test.go:16: Returned string is empty