diff --git a/client/client.go b/client/client.go index d3304cf..ecd3b46 100644 --- a/client/client.go +++ b/client/client.go @@ -165,7 +165,11 @@ Return the error object with message to be returned It can be used after checking with IsError */ func getError(resp *resty.Response) error { - return errors.New(resp.Error().(*ErrorResponse).Message) + message := resp.Error().(*ErrorResponse).Message + if message == "" { + message = string(resp.Body()) + } + return errors.New(message) } /*