mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
fix: Ignore object not found error in RemoveObject() in web-handler. (#3228)
Fixes #3181
This commit is contained in:
parent
2f7fb78692
commit
3995e21c5b
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user