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

Add additional error handling #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

johnbillion
Copy link

@johnbillion johnbillion commented Aug 23, 2024


name: 🐞 Bug Fix
about: You found a bug
labels: bug


Description

I had difficulty figuring out the correct permissions required for the GitHub token to run this locally and I noticed that the script would error without showing the error message from the API response. This PR adds an additional error handler which is triggered if, for example, you use a GitHub token which does not have the read:org permission.

Example

> ghsvg

API failure: Your token has not been granted the required scopes to execute this query. The 'email' field requires one of the following scopes: ['user:email', 'read:user'], but your token has only been granted the: ['read:org', 'repo'] scopes. Please modify your token's scopes at: https://github.com/settings/tokens.

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

Successfully merging this pull request may close these issues.

1 participant