Skip to content

Commit 1be6174

Browse files
Merge pull request #4 from codefresh-io/SAAS-6827
fix error message
2 parents dec24a4 + 3520c30 commit 1be6174

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.18.0
1+
0.19.0

pkg/codefresh/runtime_enrionment.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package codefresh
33
import (
44
"encoding/json"
55
"fmt"
6+
"io/ioutil"
67
"net/url"
78
"time"
89
)
@@ -137,7 +138,12 @@ func (r *runtimeEnvironment) Create(opt *CreateRuntimeOptions) (*RuntimeEnvironm
137138
if resp.StatusCode < 400 {
138139
return re, nil
139140
}
140-
return nil, fmt.Errorf("Error during runtime environment creation, error: %s", err.Error())
141+
defer resp.Body.Close()
142+
buffer, err := ioutil.ReadAll(resp.Body)
143+
if err != nil {
144+
return nil, err
145+
}
146+
return nil, fmt.Errorf("Error during runtime environment creation, error: %s", string(buffer))
141147
}
142148

143149
func (r *runtimeEnvironment) Validate(opt *ValidateRuntimeOptions) error {

0 commit comments

Comments
 (0)