little-angry-clouds / kubernetes-binaries-managers

Kubernetes related binaries manager.
GNU General Public License v3.0
101 stars 11 forks source link

kbenv list remote does not show rate limit error, when github api rate limit is reached #44

Open EHJ-52n opened 1 year ago

EHJ-52n commented 1 year ago

When the GitHub API rate limit is reached, the command kbenv list remote returns a not enduser friendly error message:

~ kbenv list remote
An error was detected, exiting: json: cannot unmarshal object into Go value of type []versions.Page
~ curl --silent -L https://api.github.com/rate_limit | jq -Mr '.rate'
{
  "limit": 60,
  "remaining": 0,
  "reset": 1690816864,
  "used": 60,
  "resource": "core"
}
~

Please improve the error message including a translation of the reset timestamp, hence the user knows, when this command will return useful information again.