From 20584dc08f37e859545ea1f355588c5479713a3a Mon Sep 17 00:00:00 2001 From: kannappanr <30541348+kannappanr@users.noreply.github.com> Date: Thu, 11 Jan 2018 11:42:05 -0800 Subject: [PATCH] Remove unnecessary errors printed on the console (#5386) Some of the errors printed on server console can be removed as those error message is unnecessary. Fixes #5385 --- cmd/bucket-handlers-listobjects.go | 2 -- cmd/bucket-handlers.go | 10 ---------- cmd/bucket-notification-handlers.go | 3 --- cmd/bucket-policy-handlers.go | 4 ---- cmd/bucket-policy.go | 3 --- cmd/fs-v1.go | 1 - cmd/gateway-handlers.go | 16 ---------------- cmd/object-handlers.go | 18 ------------------ cmd/signature-v2.go | 2 -- cmd/streaming-signature-v4.go | 1 - cmd/web-handlers.go | 1 - cmd/xl-v1-multipart.go | 2 +- cmd/xl-v1-object.go | 3 +-- 13 files changed, 2 insertions(+), 64 deletions(-) diff --git a/cmd/bucket-handlers-listobjects.go b/cmd/bucket-handlers-listobjects.go index ea1b98b24..f204773c1 100644 --- a/cmd/bucket-handlers-listobjects.go +++ b/cmd/bucket-handlers-listobjects.go @@ -115,7 +115,6 @@ func (api objectAPIHandlers) ListObjectsV2Handler(w http.ResponseWriter, r *http // marshalled into S3 compatible XML header. listObjectsInfo, err := objectAPI.ListObjects(bucket, prefix, marker, delimiter, maxKeys) if err != nil { - errorIf(err, "Unable to list objects.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -161,7 +160,6 @@ func (api objectAPIHandlers) ListObjectsV1Handler(w http.ResponseWriter, r *http // marshalled into S3 compatible XML header. listObjectsInfo, err := objectAPI.ListObjects(bucket, prefix, marker, delimiter, maxKeys) if err != nil { - errorIf(err, "Unable to list objects.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } diff --git a/cmd/bucket-handlers.go b/cmd/bucket-handlers.go index c6799084f..700416b2e 100644 --- a/cmd/bucket-handlers.go +++ b/cmd/bucket-handlers.go @@ -128,7 +128,6 @@ func (api objectAPIHandlers) GetBucketLocationHandler(w http.ResponseWriter, r * } if _, err := objectAPI.GetBucketInfo(bucket); err != nil { - errorIf(err, "Unable to fetch bucket info.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -185,7 +184,6 @@ func (api objectAPIHandlers) ListMultipartUploadsHandler(w http.ResponseWriter, listMultipartsInfo, err := objectAPI.ListMultipartUploads(bucket, prefix, keyMarker, uploadIDMarker, delimiter, maxUploads) if err != nil { - errorIf(err, "Unable to list multipart uploads.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -221,7 +219,6 @@ func (api objectAPIHandlers) ListBucketsHandler(w http.ResponseWriter, r *http.R // Invoke the list buckets. bucketsInfo, err := objectAPI.ListBuckets() if err != nil { - errorIf(err, "Unable to list buckets.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -335,7 +332,6 @@ func (api objectAPIHandlers) DeleteMultipleObjectsHandler(w http.ResponseWriter, deletedObjects = append(deletedObjects, object) continue } - errorIf(err, "Unable to delete object. %s", object.ObjectName) // Error during delete should be collected separately. deleteErrors = append(deleteErrors, DeleteError{ Code: errorCodeResponse[toAPIErrorCode(err)].Code, @@ -418,7 +414,6 @@ func (api objectAPIHandlers) PutBucketHandler(w http.ResponseWriter, r *http.Req // Proceed to creating a bucket. err := objectAPI.MakeBucketWithLocation(bucket, "") if err != nil { - errorIf(err, "Unable to create a bucket.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -546,13 +541,11 @@ func (api objectAPIHandlers) PostPolicyBucketHandler(w http.ResponseWriter, r *h lengthRange := postPolicyForm.Conditions.ContentLengthRange if lengthRange.Valid { if fileSize < lengthRange.Min { - errorIf(err, "Unable to create object.") writeErrorResponse(w, toAPIErrorCode(errDataTooSmall), r.URL) return } if fileSize > lengthRange.Max || isMaxObjectSize(fileSize) { - errorIf(err, "Unable to create object.") writeErrorResponse(w, toAPIErrorCode(errDataTooLarge), r.URL) return } @@ -582,7 +575,6 @@ func (api objectAPIHandlers) PostPolicyBucketHandler(w http.ResponseWriter, r *h objInfo, err := objectAPI.PutObject(bucket, object, hashReader, metadata) if err != nil { - errorIf(err, "Unable to create object.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -662,7 +654,6 @@ func (api objectAPIHandlers) HeadBucketHandler(w http.ResponseWriter, r *http.Re defer bucketLock.RUnlock() if _, err := objectAPI.GetBucketInfo(bucket); err != nil { - errorIf(err, "Unable to fetch bucket info.") writeErrorResponseHeadersOnly(w, toAPIErrorCode(err)) return } @@ -696,7 +687,6 @@ func (api objectAPIHandlers) DeleteBucketHandler(w http.ResponseWriter, r *http. // Attempt to delete bucket. if err := objectAPI.DeleteBucket(bucket); err != nil { - errorIf(err, "Unable to delete a bucket.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } diff --git a/cmd/bucket-notification-handlers.go b/cmd/bucket-notification-handlers.go index 6d47c4fac..3542dcf7a 100644 --- a/cmd/bucket-notification-handlers.go +++ b/cmd/bucket-notification-handlers.go @@ -59,7 +59,6 @@ func (api objectAPIHandlers) GetBucketNotificationHandler(w http.ResponseWriter, _, err := objAPI.GetBucketInfo(bucket) if err != nil { - errorIf(err, "Unable to find bucket info.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -113,7 +112,6 @@ func (api objectAPIHandlers) PutBucketNotificationHandler(w http.ResponseWriter, _, err := objectAPI.GetBucketInfo(bucket) if err != nil { - errorIf(err, "Unable to find bucket info.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -328,7 +326,6 @@ func (api objectAPIHandlers) ListenBucketNotificationHandler(w http.ResponseWrit _, err := objAPI.GetBucketInfo(bucket) if err != nil { - errorIf(err, "Unable to get bucket info.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } diff --git a/cmd/bucket-policy-handlers.go b/cmd/bucket-policy-handlers.go index c5033a39a..63e043551 100644 --- a/cmd/bucket-policy-handlers.go +++ b/cmd/bucket-policy-handlers.go @@ -236,7 +236,6 @@ func (api objectAPIHandlers) PutBucketPolicyHandler(w http.ResponseWriter, r *ht // Before proceeding validate if bucket exists. _, err := objAPI.GetBucketInfo(bucket) if err != nil { - errorIf(err, "Unable to find bucket info.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -295,7 +294,6 @@ func (api objectAPIHandlers) DeleteBucketPolicyHandler(w http.ResponseWriter, r // Before proceeding validate if bucket exists. _, err := objAPI.GetBucketInfo(bucket) if err != nil { - errorIf(err, "Unable to find bucket info.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -336,7 +334,6 @@ func (api objectAPIHandlers) GetBucketPolicyHandler(w http.ResponseWriter, r *ht // Before proceeding validate if bucket exists. _, err := objAPI.GetBucketInfo(bucket) if err != nil { - errorIf(err, "Unable to find bucket info.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -344,7 +341,6 @@ func (api objectAPIHandlers) GetBucketPolicyHandler(w http.ResponseWriter, r *ht // Read bucket access policy. policy, err := readBucketPolicy(bucket, objAPI) if err != nil { - errorIf(err, "Unable to read bucket policy.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } diff --git a/cmd/bucket-policy.go b/cmd/bucket-policy.go index 0bc82a40b..d2496adc3 100644 --- a/cmd/bucket-policy.go +++ b/cmd/bucket-policy.go @@ -88,7 +88,6 @@ func loadAllBucketPolicies(objAPI ObjectLayer) (policies map[string]policy.Bucke // List buckets to proceed loading all notification configuration. buckets, err := objAPI.ListBuckets() if err != nil { - errorIf(err, "Unable to list buckets.") return nil, errors.Cause(err) } @@ -199,7 +198,6 @@ func removeBucketPolicy(bucket string, objAPI ObjectLayer) error { defer objLock.Unlock() err := objAPI.DeleteObject(minioMetaBucket, policyPath) if err != nil { - errorIf(err, "Unable to remove bucket-policy on bucket %s.", bucket) err = errors.Cause(err) if _, ok := err.(ObjectNotFound); ok { return BucketPolicyNotFound{Bucket: bucket} @@ -242,7 +240,6 @@ func parseAndPersistBucketPolicy(bucket string, policyBytes []byte, objAPI Objec var bktPolicy policy.BucketAccessPolicy err := parseBucketPolicy(bytes.NewReader(policyBytes), &bktPolicy) if err != nil { - errorIf(err, "Unable to parse bucket policy.") return ErrInvalidPolicyDocument } diff --git a/cmd/fs-v1.go b/cmd/fs-v1.go index c7368a358..9eb93bbe5 100644 --- a/cmd/fs-v1.go +++ b/cmd/fs-v1.go @@ -634,7 +634,6 @@ func (fs fsObjects) PutObject(bucket string, object string, data *hash.Reader, m bytesWritten, err := fsCreateFile(fsTmpObjPath, data, buf, data.Size()) if err != nil { fsRemoveFile(fsTmpObjPath) - errorIf(err, "Failed to create object %s/%s", bucket, object) return ObjectInfo{}, toObjectErr(err, bucket, object) } diff --git a/cmd/gateway-handlers.go b/cmd/gateway-handlers.go index 2e77d4a18..3504119dc 100644 --- a/cmd/gateway-handlers.go +++ b/cmd/gateway-handlers.go @@ -81,7 +81,6 @@ func (api gatewayAPIHandlers) GetObjectHandler(w http.ResponseWriter, r *http.Re } objInfo, err := getObjectInfo(bucket, object) if err != nil { - errorIf(err, "Unable to fetch object info.") apiErr := toAPIErrorCode(err) if apiErr == ErrNoSuchKey { apiErr = errAllowableObjectNotFound(bucket, r) @@ -199,7 +198,6 @@ func (api gatewayAPIHandlers) PutObjectHandler(w http.ResponseWriter, r *http.Re // Get Content-Md5 sent by client and verify if valid md5Bytes, err := checkValidMD5(r.Header.Get("Content-Md5")) if err != nil { - errorIf(err, "Unable to validate content-md5 format.") writeErrorResponse(w, ErrInvalidDigest, r.URL) return } @@ -211,7 +209,6 @@ func (api gatewayAPIHandlers) PutObjectHandler(w http.ResponseWriter, r *http.Re sizeStr := r.Header.Get("x-amz-decoded-content-length") size, err = strconv.ParseInt(sizeStr, 10, 64) if err != nil { - errorIf(err, "Unable to parse `x-amz-decoded-content-length` into its integer value", sizeStr) writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -230,7 +227,6 @@ func (api gatewayAPIHandlers) PutObjectHandler(w http.ResponseWriter, r *http.Re // Extract metadata to be saved from incoming HTTP header. metadata, err := extractMetadataFromHeader(r.Header) if err != nil { - errorIf(err, "found invalid http request header") writeErrorResponse(w, ErrInternalError, r.URL) return } @@ -385,7 +381,6 @@ func (api gatewayAPIHandlers) HeadObjectHandler(w http.ResponseWriter, r *http.R } objInfo, err := getObjectInfo(bucket, object) if err != nil { - errorIf(err, "Unable to fetch object info.") apiErr := toAPIErrorCode(err) if apiErr == ErrNoSuchKey { apiErr = errAllowableObjectNotFound(bucket, r) @@ -448,7 +443,6 @@ func (api gatewayAPIHandlers) PutBucketPolicyHandler(w http.ResponseWriter, r *h // Before proceeding validate if bucket exists. _, err := objAPI.GetBucketInfo(bucket) if err != nil { - errorIf(err, "Unable to find bucket info.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -511,7 +505,6 @@ func (api gatewayAPIHandlers) DeleteBucketPolicyHandler(w http.ResponseWriter, r // Before proceeding validate if bucket exists. _, err := objAPI.GetBucketInfo(bucket) if err != nil { - errorIf(err, "Unable to find bucket info.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -545,21 +538,18 @@ func (api gatewayAPIHandlers) GetBucketPolicyHandler(w http.ResponseWriter, r *h // Before proceeding validate if bucket exists. _, err := objAPI.GetBucketInfo(bucket) if err != nil { - errorIf(err, "Unable to find bucket info.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } bp, err := objAPI.GetBucketPolicies(bucket) if err != nil { - errorIf(err, "Unable to read bucket policy.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } policyBytes, err := json.Marshal(bp) if err != nil { - errorIf(err, "Unable to read bucket policy.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -631,7 +621,6 @@ func (api gatewayAPIHandlers) PutBucketHandler(w http.ResponseWriter, r *http.Re // Proceed to creating a bucket. err := objectAPI.MakeBucketWithLocation(bucket, location) if err != nil { - errorIf(err, "Unable to create a bucket.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -661,7 +650,6 @@ func (api gatewayAPIHandlers) DeleteBucketHandler(w http.ResponseWriter, r *http // Attempt to delete bucket. if err := objectAPI.DeleteBucket(bucket); err != nil { - errorIf(err, "Unable to delete a bucket.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -733,7 +721,6 @@ func (api gatewayAPIHandlers) ListObjectsV1Handler(w http.ResponseWriter, r *htt // marshalled into S3 compatible XML header. listObjectsInfo, err := listObjects(bucket, prefix, marker, delimiter, maxKeys) if err != nil { - errorIf(err, "Unable to list objects.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -813,7 +800,6 @@ func (api gatewayAPIHandlers) ListObjectsV2Handler(w http.ResponseWriter, r *htt // serialized as XML and sent as S3 compatible response body. listObjectsV2Info, err := listObjectsV2(bucket, prefix, token, delimiter, maxKeys, fetchOwner, startAfter) if err != nil { - errorIf(err, "Unable to list objects. Args to listObjectsV2 are bucket=%s, prefix=%s, token=%s, delimiter=%s", bucket, prefix, token, delimiter) writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -871,7 +857,6 @@ func (api gatewayAPIHandlers) HeadBucketHandler(w http.ResponseWriter, r *http.R } if _, err := getBucketInfo(bucket); err != nil { - errorIf(err, "Unable to fetch bucket info.") writeErrorResponseHeadersOnly(w, toAPIErrorCode(err)) return } @@ -927,7 +912,6 @@ func (api gatewayAPIHandlers) GetBucketLocationHandler(w http.ResponseWriter, r } if _, err := getBucketInfo(bucket); err != nil { - errorIf(err, "Unable to fetch bucket info.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } diff --git a/cmd/object-handlers.go b/cmd/object-handlers.go index ad10fe447..0cbe1aa00 100644 --- a/cmd/object-handlers.go +++ b/cmd/object-handlers.go @@ -117,7 +117,6 @@ func (api objectAPIHandlers) GetObjectHandler(w http.ResponseWriter, r *http.Req objInfo, err := objectAPI.GetObjectInfo(bucket, object) if err != nil { - errorIf(err, "Unable to fetch object info.") apiErr := toAPIErrorCode(err) if apiErr == ErrNoSuchKey { apiErr = errAllowableObjectNotFound(bucket, r) @@ -245,7 +244,6 @@ func (api objectAPIHandlers) HeadObjectHandler(w http.ResponseWriter, r *http.Re objInfo, err := objectAPI.GetObjectInfo(bucket, object) if err != nil { - errorIf(err, "Unable to fetch object info.") apiErr := toAPIErrorCode(err) if apiErr == ErrNoSuchKey { apiErr = errAllowableObjectNotFound(bucket, r) @@ -393,7 +391,6 @@ func (api objectAPIHandlers) CopyObjectHandler(w http.ResponseWriter, r *http.Re objInfo, err := objectAPI.GetObjectInfo(srcBucket, srcObject) if err != nil { - errorIf(err, "Unable to fetch object info.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -488,7 +485,6 @@ func (api objectAPIHandlers) PutObjectHandler(w http.ResponseWriter, r *http.Req // Get Content-Md5 sent by client and verify if valid md5Bytes, err := checkValidMD5(r.Header.Get("Content-Md5")) if err != nil { - errorIf(err, "Unable to validate content-md5 format.") writeErrorResponse(w, ErrInvalidDigest, r.URL) return } @@ -500,7 +496,6 @@ func (api objectAPIHandlers) PutObjectHandler(w http.ResponseWriter, r *http.Req sizeStr := r.Header.Get("x-amz-decoded-content-length") size, err = strconv.ParseInt(sizeStr, 10, 64) if err != nil { - errorIf(err, "Unable to parse `x-amz-decoded-content-length` into its integer value", sizeStr) writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -619,7 +614,6 @@ func (api objectAPIHandlers) PutObjectHandler(w http.ResponseWriter, r *http.Req objInfo, err := objectAPI.PutObject(bucket, object, hashReader, metadata) if err != nil { - errorIf(err, "Unable to create an object. %s", r.URL.Path) writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -692,7 +686,6 @@ func (api objectAPIHandlers) NewMultipartUploadHandler(w http.ResponseWriter, r uploadID, err := objectAPI.NewMultipartUpload(bucket, object, metadata) if err != nil { - errorIf(err, "Unable to initiate new multipart upload id.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -767,7 +760,6 @@ func (api objectAPIHandlers) CopyObjectPartHandler(w http.ResponseWriter, r *htt objInfo, err := objectAPI.GetObjectInfo(srcBucket, srcObject) if err != nil { - errorIf(err, "Unable to fetch object info.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -809,7 +801,6 @@ func (api objectAPIHandlers) CopyObjectPartHandler(w http.ResponseWriter, r *htt partInfo, err := objectAPI.CopyObjectPart(srcBucket, srcObject, dstBucket, dstObject, uploadID, partID, startOffset, length, nil) if err != nil { - errorIf(err, "Unable to perform CopyObjectPart %s/%s", srcBucket, srcObject) writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -861,7 +852,6 @@ func (api objectAPIHandlers) PutObjectPartHandler(w http.ResponseWriter, r *http sizeStr := r.Header.Get("x-amz-decoded-content-length") size, err = strconv.ParseInt(sizeStr, 10, 64) if err != nil { - errorIf(err, "Unable to parse `x-amz-decoded-content-length` into its integer value", sizeStr) writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -940,7 +930,6 @@ func (api objectAPIHandlers) PutObjectPartHandler(w http.ResponseWriter, r *http hashReader, err := hash.NewReader(reader, size, md5hex, sha256hex) if err != nil { - errorIf(err, "Unable to create object part.") // Verify if the underlying error is signature mismatch. writeErrorResponse(w, toAPIErrorCode(err), r.URL) return @@ -948,7 +937,6 @@ func (api objectAPIHandlers) PutObjectPartHandler(w http.ResponseWriter, r *http partInfo, err := objectAPI.PutObjectPart(bucket, object, uploadID, partID, hashReader) if err != nil { - errorIf(err, "Unable to create object part.") // Verify if the underlying error is signature mismatch. writeErrorResponse(w, toAPIErrorCode(err), r.URL) return @@ -979,7 +967,6 @@ func (api objectAPIHandlers) AbortMultipartUploadHandler(w http.ResponseWriter, uploadID, _, _, _ := getObjectResources(r.URL.Query()) if err := objectAPI.AbortMultipartUpload(bucket, object, uploadID); err != nil { - errorIf(err, "Unable to abort multipart upload.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -1014,7 +1001,6 @@ func (api objectAPIHandlers) ListObjectPartsHandler(w http.ResponseWriter, r *ht } listPartsInfo, err := objectAPI.ListObjectParts(bucket, object, uploadID, partNumberMarker, maxParts) if err != nil { - errorIf(err, "Unable to list uploaded parts.") writeErrorResponse(w, toAPIErrorCode(err), r.URL) return } @@ -1047,13 +1033,11 @@ func (api objectAPIHandlers) CompleteMultipartUploadHandler(w http.ResponseWrite completeMultipartBytes, err := goioutil.ReadAll(r.Body) if err != nil { - errorIf(err, "Unable to complete multipart upload.") writeErrorResponse(w, ErrInternalError, r.URL) return } complMultipartUpload := &CompleteMultipartUpload{} if err = xml.Unmarshal(completeMultipartBytes, complMultipartUpload); err != nil { - errorIf(err, "Unable to parse complete multipart upload XML.") writeErrorResponse(w, ErrMalformedXML, r.URL) return } @@ -1083,7 +1067,6 @@ func (api objectAPIHandlers) CompleteMultipartUploadHandler(w http.ResponseWrite objInfo, err := objectAPI.CompleteMultipartUpload(bucket, object, uploadID, completeParts) if err != nil { - errorIf(err, "Unable to complete multipart upload.") err = errors.Cause(err) switch oErr := err.(type) { case PartTooSmall: @@ -1102,7 +1085,6 @@ func (api objectAPIHandlers) CompleteMultipartUploadHandler(w http.ResponseWrite response := generateCompleteMultpartUploadResponse(bucket, object, location, objInfo.ETag) encodedSuccessResponse := encodeResponse(response) if err != nil { - errorIf(err, "Unable to parse CompleteMultipartUpload response") writeErrorResponse(w, ErrInternalError, r.URL) return } diff --git a/cmd/signature-v2.go b/cmd/signature-v2.go index 39230ce4b..d9504ec57 100644 --- a/cmd/signature-v2.go +++ b/cmd/signature-v2.go @@ -118,7 +118,6 @@ func doesPresignV2SignatureMatch(r *http.Request) APIErrorCode { var unescapedQueries []string unescapedQueries, err = unescapeQueries(encodedQuery) if err != nil { - errorIf(err, "Unable to unescape (%s)", encodedQuery) return ErrInvalidQueryParams } @@ -242,7 +241,6 @@ func doesSignV2Match(r *http.Request) APIErrorCode { unescapedQueries, err := unescapeQueries(encodedQuery) if err != nil { - errorIf(err, "Unable to unescape (%s)", encodedQuery) return ErrInvalidQueryParams } diff --git a/cmd/streaming-signature-v4.go b/cmd/streaming-signature-v4.go index 6b53bea9e..bfe7ca0a8 100644 --- a/cmd/streaming-signature-v4.go +++ b/cmd/streaming-signature-v4.go @@ -122,7 +122,6 @@ func calculateSeedSignature(r *http.Request) (signature string, region string, d var err error date, err = time.Parse(iso8601Format, dateStr) if err != nil { - errorIf(err, "Unable to parse date", dateStr) return "", "", time.Time{}, ErrMalformedDate } diff --git a/cmd/web-handlers.go b/cmd/web-handlers.go index c53f1cde7..47b792c11 100644 --- a/cmd/web-handlers.go +++ b/cmd/web-handlers.go @@ -560,7 +560,6 @@ func (web *webAPIHandlers) Upload(w http.ResponseWriter, r *http.Request) { // Extract incoming metadata if any. metadata, err := extractMetadataFromHeader(r.Header) if err != nil { - errorIf(err, "found invalid http request header") writeErrorResponse(w, ErrInternalError, r.URL) return } diff --git a/cmd/xl-v1-multipart.go b/cmd/xl-v1-multipart.go index 4172061fb..6b5204884 100644 --- a/cmd/xl-v1-multipart.go +++ b/cmd/xl-v1-multipart.go @@ -592,7 +592,7 @@ func (xl xlObjects) CopyObjectPart(srcBucket, srcObject, dstBucket, dstObject, u go func() { if gerr := xl.GetObject(srcBucket, srcObject, startOffset, length, pipeWriter); gerr != nil { - errorIf(gerr, "Unable to read %s of the object `%s/%s`.", srcBucket, srcObject) + errorIf(gerr, "Unable to read object `%s/%s`.", srcBucket, srcObject) pipeWriter.CloseWithError(toObjectErr(gerr, srcBucket, srcObject)) return } diff --git a/cmd/xl-v1-object.go b/cmd/xl-v1-object.go index 42bef4739..9548a9fff 100644 --- a/cmd/xl-v1-object.go +++ b/cmd/xl-v1-object.go @@ -115,7 +115,7 @@ func (xl xlObjects) CopyObject(srcBucket, srcObject, dstBucket, dstObject string go func() { var startOffset int64 // Read the whole file. if gerr := xl.GetObject(srcBucket, srcObject, startOffset, length, pipeWriter); gerr != nil { - errorIf(gerr, "Unable to read %s of the object `%s/%s`.", srcBucket, srcObject) + errorIf(gerr, "Unable to read object `%s/%s`.", srcBucket, srcObject) pipeWriter.CloseWithError(toObjectErr(gerr, srcBucket, srcObject)) return } @@ -294,7 +294,6 @@ func (xl xlObjects) GetObject(bucket, object string, startOffset int64, length i file, err := storage.ReadFile(mw, bucket, pathJoin(object, partName), partOffset, readSize, partSize, checksums, algorithm, xlMeta.Erasure.BlockSize) if err != nil { - errorIf(err, "Unable to read %s of the object `%s/%s`.", partName, bucket, object) return toObjectErr(err, bucket, object) }