|
|
@@ -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())
|
|
|
}
|