Skip to content

Commit

Permalink
Add StatusNoContent to interpretBody
Browse files Browse the repository at this point in the history
muXxer committed Mar 22, 2024
1 parent 845f859 commit 38af7c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nodeclient/http.go
Original file line number Diff line number Diff line change
@@ -56,6 +56,10 @@ func readBody(res *http.Response) ([]byte, error) {
func interpretBody(ctx context.Context, serixAPI *serix.API, res *http.Response, decodeTo interface{}) error {
defer res.Body.Close()

if res.StatusCode == http.StatusNoContent {
return nil
}

if res.StatusCode == http.StatusOK || res.StatusCode == http.StatusCreated {
if decodeTo == nil {
return nil

0 comments on commit 38af7c9

Please sign in to comment.