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

🚀[Feature]: Enrich error message with info on permissions #226

Open
MariusStorhaug opened this issue Dec 18, 2024 · 0 comments
Open

🚀[Feature]: Enrich error message with info on permissions #226

MariusStorhaug opened this issue Dec 18, 2024 · 0 comments
Labels
feature New feature

Comments

@MariusStorhaug
Copy link
Member

MariusStorhaug commented Dec 18, 2024

Description

When a request fails due to permissions, use the header properties to give a informative error.

x-accepted-github-permissions = GitHub App permissions, 'members=write'
x-accepted-oauth-scopes = OAuthApp permissions, 'admin:org, repo'

Current error message:

Invoke-GitHubAPI: ----------------------------------                                                                    
Invoke-GitHubAPI: Error details:
Invoke-GitHubAPI: 
Invoke-GitHubAPI: Message     Validation Failed
Invoke-GitHubAPI: Information https://docs.github.com/rest/teams/teams#create-a-team
Invoke-GitHubAPI: Status      Response status code does not indicate success: 422 (Unprocessable Entity).
Invoke-GitHubAPI: StatusCode  422
Invoke-GitHubAPI: 
Invoke-GitHubAPI: ----------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
Status: Todo
Development

No branches or pull requests

1 participant