Skip to content

Commit ee8f2a8

Browse files
committed
logging print outs adjusted
1 parent 3b0b9b4 commit ee8f2a8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

httpclient/multipartrequest.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,13 @@ func (c *Client) DoMultiPartRequest(method, endpoint string, files map[string][]
122122
startTime := time.Now()
123123

124124
// Debugging
125-
jsonData, _ := json.MarshalIndent(req, "", " ")
126125
c.Sugar.Debug("LOGHERE")
127-
c.Sugar.Debug(string(jsonData))
126+
jsonData, err := json.MarshalIndent(req, "", " ")
127+
if err != nil {
128+
c.Sugar.Debugf("error marshalling: %v", err)
129+
} else {
130+
c.Sugar.Debug(string(jsonData))
131+
}
128132

129133
resp, requestErr := c.http.Do(req)
130134
duration := time.Since(startTime)

0 commit comments

Comments
 (0)