rm: Show deleted error msg when delete marker is found (#3407)

HEAD object returns 404 with a delete-marker header when the object is a
delete-marker in a versioning bucket. This PR will show a better error
message in that case.

Use url2Stat() and ignore 400 bad request error.
This commit is contained in:
Anis Elleuch
2020-09-21 11:42:31 -07:00
committed by GitHub
parent ce0c109ae3
commit 9ff6c146b4
5 changed files with 47 additions and 16 deletions
+8
View File
@@ -168,6 +168,14 @@ func (e ObjectMissing) Error() string {
return "Object does not exist"
}
// ObjectIsDeleteMarker - object is a delete marker as latest
type ObjectIsDeleteMarker struct {
}
func (e ObjectIsDeleteMarker) Error() string {
return "Object is marked as deleted"
}
// UnexpectedShortWrite - write wrote less bytes than expected.
type UnexpectedShortWrite struct {
InputSize int