mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
use acceptedResponseStatusCode everywhere in HTTP logger (#13755)
This commit is contained in:
@@ -157,7 +157,7 @@ func (h *Target) startHTTPLogger() {
|
||||
// Drain any response.
|
||||
xhttp.DrainBody(resp.Body)
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
if !acceptedResponseStatusCode(resp.StatusCode) {
|
||||
switch resp.StatusCode {
|
||||
case http.StatusForbidden:
|
||||
h.config.LogOnce(ctx, fmt.Errorf("%s returned '%s', please check if your auth token is correctly set", h.config.Endpoint, resp.Status), h.config.Endpoint)
|
||||
|
||||
Reference in New Issue
Block a user