[#728] Remove redundant log message

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
This commit is contained in:
Angira Kekteeva 2022-10-25 19:14:46 +04:00 committed by Alex Vanin
parent bbd7ba670a
commit 712740b668
3 changed files with 12 additions and 17 deletions

View file

@ -154,16 +154,8 @@ func logErrorResponse(l *zap.Logger) mux.MiddlewareFunc {
// pass execution:
h.ServeHTTP(lw, r)
// Ignore <300 status codes
if lw.statusCode >= http.StatusMultipleChoices {
l.Error("something went wrong",
zap.Int("status", lw.statusCode),
zap.String("request_id", GetRequestID(r.Context())),
zap.String("method", mux.CurrentRoute(r).GetName()),
zap.String("bucket", reqInfo.BucketName),
zap.String("object", reqInfo.ObjectName),
zap.String("description", http.StatusText(lw.statusCode)))
// Ignore >400 status codes
if lw.statusCode >= http.StatusBadRequest {
return
}