diff --git a/cmd/object-api-errors.go b/cmd/object-api-errors.go index 62b4ee926..fdef00f39 100644 --- a/cmd/object-api-errors.go +++ b/cmd/object-api-errors.go @@ -703,5 +703,6 @@ func isErrMethodNotAllowed(err error) bool { } func isErrInvalidRange(err error) bool { - return errors.As(err, &errInvalidRange) + _, ok := err.(InvalidRange) + return ok } diff --git a/docs/site-replication/run-multi-site-minio-idp.sh b/docs/site-replication/run-multi-site-minio-idp.sh index be325ad52..8c72b07be 100755 --- a/docs/site-replication/run-multi-site-minio-idp.sh +++ b/docs/site-replication/run-multi-site-minio-idp.sh @@ -173,6 +173,17 @@ if [ $? -ne 0 ]; then exit_1; fi +err_minio2=$(./mc stat minio2/newbucket/xxx --json | jq -r .error.cause.message) +if [ $? -ne 0 ]; then + echo "expecting object to be missing. exiting.." + exit_1; +fi + +if [ "${err_minio2}" != "Object does not exist" ]; then + echo "expected to see Object does not exist error, exiting..." + exit_1; +fi + ./mc cp README.md minio2/newbucket/ sleep 5