Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Yamashou committed Nov 9, 2023
1 parent 7fbb2ea commit 2fa0ff4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions clientv2/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"errors"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"strconv"
Expand Down Expand Up @@ -271,6 +272,7 @@ func prepareMultipartFormBody(
defer func(writer *multipart.Writer) {
err := writer.Close()
if err != nil {
log.Fatal(err)
}
}(writer)

Expand Down Expand Up @@ -317,6 +319,7 @@ func (c *Client) do(_ context.Context, req *http.Request, _ *GQLRequestInfo, res
defer func(Body io.ReadCloser) {
err := Body.Close()
if err != nil {
log.Fatal(err)
}
}(resp.Body)

Expand Down Expand Up @@ -345,8 +348,6 @@ func (c *Client) parseResponse(body []byte, httpCode int, result interface{}) er
}
}

fmt.Println("body", string(body))

// some servers return a graphql error with a non OK http code, try anyway to parse the body
if err := c.unmarshal(body, result); err != nil {
var gqlErr *GqlErrorList
Expand Down

0 comments on commit 2fa0ff4

Please sign in to comment.