From 2e19619e7932a5ebf705b13d42786ebbc406c6a9 Mon Sep 17 00:00:00 2001 From: poornas Date: Wed, 21 Aug 2019 13:01:46 -0700 Subject: [PATCH] browser: Avoid logging BucketNotEmpty error (#8110) --- cmd/web-handlers.go | 2 ++ cmd/web-handlers_test.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/web-handlers.go b/cmd/web-handlers.go index 465f08c82..70b694d8e 100644 --- a/cmd/web-handlers.go +++ b/cmd/web-handlers.go @@ -1972,6 +1972,8 @@ func toWebAPIError(ctx context.Context, err error) APIError { return getAPIError(ErrStorageFull) case BucketNotFound: return getAPIError(ErrNoSuchBucket) + case BucketNotEmpty: + return getAPIError(ErrBucketNotEmpty) case BucketExists: return getAPIError(ErrBucketAlreadyOwnedByYou) case BucketNameInvalid: diff --git a/cmd/web-handlers_test.go b/cmd/web-handlers_test.go index ad0dd25c6..c5562a6b6 100644 --- a/cmd/web-handlers_test.go +++ b/cmd/web-handlers_test.go @@ -338,7 +338,7 @@ func testDeleteBucketWebHandler(obj ObjectLayer, instanceType string, t TestErrH {"minio", false, "false token", "Authentication failed"}, {"minio", false, token, "The specified bucket is not valid"}, {bucketName, false, token, ""}, - {bucketName, true, token, "Bucket not empty"}, + {bucketName, true, token, "The bucket you tried to delete is not empty"}, {bucketName, false, "", "JWT token missing"}, }