mirror of
https://github.com/minio/minio.git
synced 2024-12-25 06:35:56 -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{}
|
err = BucketPolicyNotFound{}
|
||||||
case "InvalidBucketName":
|
case "InvalidBucketName":
|
||||||
err = BucketNameInvalid{Bucket: bucket}
|
err = BucketNameInvalid{Bucket: bucket}
|
||||||
|
case "InvalidPart":
|
||||||
|
err = InvalidPart{}
|
||||||
case "NoSuchBucket":
|
case "NoSuchBucket":
|
||||||
err = BucketNotFound{Bucket: bucket}
|
err = BucketNotFound{Bucket: bucket}
|
||||||
case "NoSuchKey":
|
case "NoSuchKey":
|
||||||
|
@ -50,6 +50,10 @@ func TestS3ToObjectError(t *testing.T) {
|
|||||||
inputErr: errResponse("InvalidBucketName"),
|
inputErr: errResponse("InvalidBucketName"),
|
||||||
expectedErr: minio.BucketNameInvalid{},
|
expectedErr: minio.BucketNameInvalid{},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
inputErr: errResponse("InvalidPart"),
|
||||||
|
expectedErr: minio.InvalidPart{},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
inputErr: errResponse("NoSuchBucketPolicy"),
|
inputErr: errResponse("NoSuchBucketPolicy"),
|
||||||
expectedErr: minio.BucketPolicyNotFound{},
|
expectedErr: minio.BucketPolicyNotFound{},
|
||||||
|
Loading…
Reference in New Issue
Block a user