From 3995e21c5b0263c2d4dbe42b8f0ec193179dfc6c Mon Sep 17 00:00:00 2001 From: Bala FA Date: Thu, 10 Nov 2016 15:02:03 -0800 Subject: [PATCH] fix: Ignore object not found error in RemoveObject() in web-handler. (#3228) Fixes #3181 --- cmd/web-handlers.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmd/web-handlers.go b/cmd/web-handlers.go index 6f0b8459a..9b1f616ba 100644 --- a/cmd/web-handlers.go +++ b/cmd/web-handlers.go @@ -271,7 +271,15 @@ func (web *webAPIHandlers) RemoveObject(r *http.Request, args *RemoveObjectArgs, return &json2.Error{Message: errAuthentication.Error()} } if err := objectAPI.DeleteObject(args.BucketName, args.ObjectName); err != nil { - return &json2.Error{Message: err.Error()} + objErr := errorCause(err) + switch objErr.(type) { + case ObjectNotFound: + // Ignore object not found error. + reply.UIVersion = miniobrowser.UIVersion + return nil + default: + return &json2.Error{Message: err.Error()} + } } // Notify object deleted event.