From 63f85b8851ed971a80a51123833510d533e344c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edmond=20Dant=C3=A8s?= <18221510672@139.com> Date: Fri, 6 Sep 2024 14:40:27 +0800 Subject: [PATCH] Update utils.go --- utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils.go b/utils.go index e8b05ce..a7c79aa 100644 --- a/utils.go +++ b/utils.go @@ -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 @@ -91,4 +91,4 @@ func addOptions(s string, opt interface{}) (string, error) { origURL.RawQuery = origValues.Encode() return origURL.String(), nil -} \ No newline at end of file +}