Skip to content

Commit 2fa18f8

Browse files
committed
fix(controller-sdk-go): panic when 500 statuscode
1 parent 286f094 commit 2fa18f8

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ module github.com/drycc/controller-sdk-go
22

33
go 1.20
44

5-
require golang.org/x/net v0.17.0
5+
require golang.org/x/net v0.12.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
2-
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
1+
golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50=
2+
golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA=

http.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ func (c *Client) Request(method string, path string, body []byte) (*http.Respons
5656
res, err := c.HTTPClient.Do(req)
5757

5858
if err != nil {
59-
return nil, err
59+
return res, err
6060
}
6161

6262
if err = checkForErrors(res); err != nil {
63-
return nil, err
63+
return res, err
6464
}
6565

6666
apiVersion := res.Header.Get("DRYCC_API_VERSION")

0 commit comments

Comments
 (0)