-
Notifications
You must be signed in to change notification settings - Fork 221
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
8 - Provide clearer error for non-200 status codes without JSON #19
Conversation
fb52857
to
0babf94
Compare
…about the status code if it was not 200 accounting for both paths where there might be a non-200 response
0babf94
to
9835de6
Compare
@dahernan is it possible you'd be able to take a look at this? I'm definitely open to suggestions on the PR, I was trying to maintain the current behavior, but account for errors where there isn't a JSON response with as little modification as possible. |
Sorry I have no context for this, maybe @matryer could help |
I went based of the last couple merges, sorry for the incorrect ping. Thanks for checking out the PR and providing this client. |
graphql.go
Outdated
@@ -42,6 +42,8 @@ import ( | |||
"github.com/pkg/errors" | |||
) | |||
|
|||
const errorNon200Template = "graphql: server returned a non-200 status code: %v" |
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 feels like an unnecessary constant to me. Let's just duplicate the string for now?
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.
(Great PR btw)
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.
thanks @matryer, I pulled the constant and duplicated the string.
Looks like it's failing because of this, updating my branch. |
Thanks @erutherford, nice work. |
What
#8