obj: Make checkBucketExist() returns all errors (#3843)

This function was returning BucketNotFound for all errors
which at least hides the fact that disks could be corrupted.
This commit fixes the behavior by returning all errors that,
are, by the way, Object API errors.
master
Anis Elleuch 8 years ago committed by Harshavardhana
parent e5d4e7aa9d
commit 28c53a3555
  1. 2
      cmd/object-api-input-checks.go

@ -151,7 +151,7 @@ func checkBucketExist(bucket string, obj ObjectLayer) error {
}
_, err := obj.GetBucketInfo(bucket)
if err != nil {
return BucketNotFound{Bucket: bucket}
return errorCause(err)
}
return nil
}

Loading…
Cancel
Save