mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
handle exception InvalidPart (#6649)
This commit is contained in:
parent
26b4b466df
commit
088c595e01
@ -294,6 +294,8 @@ func ErrorRespToObjectError(err error, params ...string) error {
|
||||
err = BucketPolicyNotFound{}
|
||||
case "InvalidBucketName":
|
||||
err = BucketNameInvalid{Bucket: bucket}
|
||||
case "InvalidPart":
|
||||
err = InvalidPart{}
|
||||
case "NoSuchBucket":
|
||||
err = BucketNotFound{Bucket: bucket}
|
||||
case "NoSuchKey":
|
||||
|
@ -50,6 +50,10 @@ func TestS3ToObjectError(t *testing.T) {
|
||||
inputErr: errResponse("InvalidBucketName"),
|
||||
expectedErr: minio.BucketNameInvalid{},
|
||||
},
|
||||
{
|
||||
inputErr: errResponse("InvalidPart"),
|
||||
expectedErr: minio.InvalidPart{},
|
||||
},
|
||||
{
|
||||
inputErr: errResponse("NoSuchBucketPolicy"),
|
||||
expectedErr: minio.BucketPolicyNotFound{},
|
||||
|
Loading…
Reference in New Issue
Block a user