Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message when Github token is invalid #42

Open
sogamoso opened this issue Nov 21, 2019 · 2 comments
Open

Error message when Github token is invalid #42

sogamoso opened this issue Nov 21, 2019 · 2 comments

Comments

@sogamoso
Copy link
Contributor

sogamoso commented Nov 21, 2019

When the Github token becomes invalid, the output is not very useful and doesn't tell you what you need to do. It would be nice to improve that.

Context

I just tried to run cp8 start ... and got an error that required me to look into the source code to find out where the Github token was is stored so that I could update it.

cp8 start https://github.com/cookpad/...issues/2852
Traceback (most recent call last):
	...
/.../ruby/gems/2.6.0/gems/octokit-4.14.0/lib/octokit/response/raise_error.rb:16:in `on_complete': GET https://api.github.com/repos/cookpad/.../issues/2852: 401 - Bad credentials // See: https://developer.github.com/v3 (Octokit::Unauthorized)

Proposed solution

Rescue from the error that's being raised (if any) or read the response status code and show an error message such as: "Your Github token is no longer valid, please generate a new one in https://github.com/settings/tokens and update it in ~/.trello_flow" or something along those lines.

@radeklat
Copy link

radeklat commented Apr 7, 2020

Similarly, for GitHub tokens with insufficient privileges.

@balvig
Copy link
Contributor

balvig commented Apr 15, 2020

Sounds like a good idea 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants