Fix error messages returned by (Put)GetObjectLegalHold (#9013)

fiixing some minor discrepancies between aws s3 responses
vs minio server
This commit is contained in:
poornas
2020-02-18 18:45:48 -08:00
committed by GitHub
parent 16a6e68d7b
commit 02a59a04d1
4 changed files with 24 additions and 6 deletions

View File

@@ -151,6 +151,7 @@ const (
ErrKeyTooLongError
ErrInvalidBucketObjectLockConfiguration
ErrObjectLockConfigurationNotAllowed
ErrNoSuchObjectLockConfiguration
ErrObjectLocked
ErrInvalidRetentionDate
ErrPastObjectLockRetainDate
@@ -761,6 +762,11 @@ var errorCodes = errorCodeMap{
Description: "Object Lock configuration cannot be enabled on existing buckets.",
HTTPStatusCode: http.StatusConflict,
},
ErrNoSuchObjectLockConfiguration: {
Code: "NoSuchObjectLockConfiguration",
Description: "The specified object does not have a ObjectLock configuration",
HTTPStatusCode: http.StatusBadRequest,
},
ErrObjectLocked: {
Code: "InvalidRequest",
Description: "Object is WORM protected and cannot be overwritten",