Skip to content

Commit

Permalink
Merge pull request #179 from cho4036/develop
Browse files Browse the repository at this point in the history
trivial. handling 2xx http status code
  • Loading branch information
ktkfree authored Oct 26, 2023
2 parents e06fbb9 + eed642a commit 0bd57b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/api-client/api-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (c *ApiClientImpl) callWithBody(prefix string, method string, path string,
res.Body.Close()
}()

if res.StatusCode != 200 {
if res.StatusCode%100 != 2 {
var restError httpErrors.RestError
if err := json.Unmarshal(body, &restError); err != nil {
return nil, fmt.Errorf("Invalid http status. failed to unmarshal body : %s", err)
Expand Down

0 comments on commit 0bd57b1

Please sign in to comment.