vscode-github-notifications-bell icon indicating copy to clipboard operation
vscode-github-notifications-bell copied to clipboard

Change color to red if the personal access token is invalid

Open vfonic opened this issue 5 years ago • 3 comments

I just tried setting invalid github token and realized that I didn't get any errors back.

This happens here: https://github.com/fabiospampinato/vscode-github-notifications-bell/blob/master/src/statusbar.ts#L70

When API token is correct, the response is an array of notifications: JSON.parse ( result[0].body ) // => [{...}, {...}]

When API token is incorrect, the response is an object: JSON.parse ( result[0].body ) // => {"message":"Bad credentials","documentation_url":"https://developer.github.com/v3"}

It would be useful for user to know that they didn't set the token right.

vfonic avatar May 17 '19 06:05 vfonic