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
Export GraphQL error types #35
Conversation
A specific use case is a work around for community/community#16168. A Technically, the current implementation still populates the response |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. Only comment would be that I think we should rename HttpErrorItem
-> HTTPErrorItem
in this PR as well since we are already here and it was a typo to begin with. Since go-gh
is beta I don't think there is much controversy with fixing that small mistake.
I did rename it in another commit but realized I forgot to push it. 😣 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Similar to
HTTPError
andHTTPErrorItem
already (which was actuallyHttpErrorItem
), exportGQLError
(wasGQLErrorREsponse
) andGQLErrorItem
(wasGQLError
). This makes it possible for callers to check the errors and react accordingly, as in cli/cli#5588 where certain GraphQL errors could be filtered out.