diff --git a/http/http.go b/http/http.go index f85fbba..4fdaf7d 100644 --- a/http/http.go +++ b/http/http.go @@ -131,7 +131,7 @@ func (s *Service) get(ctx context.Context, } } - statusFamily := resp.StatusCode / 100 + statusFamily := resp.StatusCode / http.StatusContinue if statusFamily != 2 { trimmedResponse := bytes.ReplaceAll(bytes.ReplaceAll(res.body, []byte{0x0a}, []byte{}), []byte{0x0d}, []byte{}) log.Debug().Int("status_code", resp.StatusCode).RawJSON("response", trimmedResponse).Msg("GET failed") @@ -250,7 +250,7 @@ func (s *Service) post(ctx context.Context, } } - statusFamily := resp.StatusCode / 100 + statusFamily := resp.StatusCode / http.StatusContinue if statusFamily != 2 { trimmedResponse := bytes.ReplaceAll(bytes.ReplaceAll(res.body, []byte{0x0a}, []byte{}), []byte{0x0d}, []byte{}) log.Debug().Int("status_code", resp.StatusCode).RawJSON("response", trimmedResponse).Msg("POST failed")