yjp 3 роки тому
батько
коміт
15f50c388a
1 змінених файлів з 1 додано та 2 видалено
  1. 1 2
      utils/utils.go

+ 1 - 2
utils/utils.go

@@ -1,7 +1,6 @@
 package utils
 
 import (
-	"errors"
 	"fmt"
 	"github.com/go-resty/resty/v2"
 	uuid "github.com/satori/go.uuid"
@@ -48,7 +47,7 @@ func SimpleUUID() string {
 
 func ResponseStatusError(resp *resty.Response) error {
 	if resp.Body() != nil && len(resp.Body()) != 0 {
-		return errors.New(string(resp.Body()))
+		return fmt.Errorf("Status: %d %s\n", resp.StatusCode(), resp.Body())
 	} else {
 		return fmt.Errorf("Status: %d %s\n", resp.StatusCode(), resp.Status())
 	}