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

Return human-readable GraphQL errors #239

Open
gr2m opened this issue Dec 8, 2020 · 0 comments
Open

Return human-readable GraphQL errors #239

gr2m opened this issue Dec 8, 2020 · 0 comments
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Feature New feature or request

Comments

@gr2m
Copy link
Contributor

gr2m commented Dec 8, 2020

Follow up to probot/probot#484

GraphQL returns great error messages:

GraphQLError: [{"message":"Resource not accessible by integration","type":"FORBIDDEN","path":["resource","author","hovercard"],"locations":[{"line":11,"column":15}]}]

We should take advantage of that and make them B-E-A-utiful!

There was an error in your GraphQL Query:

on line 11, column 15:
              ... on User {
                hovercard {
                
                ^-- FORBIDDEN: Resource not accessible by integration

I think we probably shouldn't put this into @octokit/graphql itself, but an Octokit plugin, because the JSON response message can be processed more easily by other tooling. But either way, if anyone would like to work on it, I'd be happy to collaborate

@gr2m gr2m added Type: Feature New feature or request Status: Up for grabs Issues that are ready to be worked on by anyone labels Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant