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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user