codespaces.el
codespaces.el copied to clipboard
Throw a better error with gh auth token isn't valid
I got a weird error when running connect for the first time:
codespaces--build-table: could not parse JSON stream: 1, 1, 1
Turns out it was the auth(which I later found in the docs of the package):
$ gh codespace list
error getting codespaces: HTTP 403: Must have admin rights to Repository. (https://api.github.com/user/codespaces?per_page=30)
This API operation needs the "codespace" scope. To request it, run: gh auth refresh -h github.com -s codespace