Revert proxying requests with precondition errors (#15180)

In a replicated setup, when an object is updated in one cluster but
still waiting to be replicated to the other cluster, GET requests with
if-match, and range headers will likely fail. It is better to proxy
requests instead.

Also, this commit avoids printing verbose logs about precondition &
range errors.
This commit is contained in:
Anis Elleuch
2022-06-27 22:03:44 +01:00
committed by GitHub
parent 767c1436d3
commit b7c7e59dac
2 changed files with 10 additions and 8 deletions
+4
View File
@@ -297,6 +297,10 @@ func ErrorRespToObjectError(err error, params ...string) error {
}
switch minioErr.Code {
case "PreconditionFailed":
err = PreConditionFailed{}
case "InvalidRange":
err = InvalidRange{}
case "BucketAlreadyOwnedByYou":
err = BucketAlreadyOwnedByYou{}
case "BucketNotEmpty":