Skip to content

Commit

Permalink
Update utils.go
Browse files Browse the repository at this point in the history
  • Loading branch information
shijl0925 committed Sep 6, 2024
1 parent 4b18412 commit 63f85b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func CheckResponse(r *http.Response) error {
data, err := io.ReadAll(r.Body)
if err == nil && data != nil {
errorResponse.Body = data
errorResponse.Message = fmt.Sprintf("%s", data)
errorResponse.Message = string(data)
}

return errorResponse
Expand Down Expand Up @@ -91,4 +91,4 @@ func addOptions(s string, opt interface{}) (string, error) {
origURL.RawQuery = origValues.Encode()

return origURL.String(), nil
}
}

0 comments on commit 63f85b8

Please sign in to comment.