-
Notifications
You must be signed in to change notification settings - Fork 92
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
Provide errors response for error handling #41
Comments
This is workaround, we can identify if var q *struct{}
if err := client.Query(ctx, &q, vars); err != nil {
if q != nil {
return errors.Wrapf(err, "this is an error such as not found or invalid query")
}
return errors.Wrapf(err, "this is an error such as network or bad json")
} |
👍 |
Agreed.
Sorry, I won't have the ability to focus on this for the next few weeks, but I'd like to after that. This is an important API decision, and I'd like to take care to find a good solution rather than rushing. I suggest iterating on this on forks as a workaround if you need a solution sooner. Reporting results here would be helpful. Thanks. |
GitHub GraphQL API returns
errors
response on error cases such as not found, for example:Currently
Query()
does not provide any errors but it should do for error handling, for example:Thank you for the great work!
The text was updated successfully, but these errors were encountered: