diff options
Diffstat (limited to 'weed/s3api/s3api_object_handlers_put.go')
| -rw-r--r-- | weed/s3api/s3api_object_handlers_put.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/s3api/s3api_object_handlers_put.go b/weed/s3api/s3api_object_handlers_put.go index 446b78fde..71f2bc2d8 100644 --- a/weed/s3api/s3api_object_handlers_put.go +++ b/weed/s3api/s3api_object_handlers_put.go @@ -566,9 +566,9 @@ func mapValidationErrorToS3Error(err error) s3err.ErrorCode { case errors.Is(err, ErrInvalidRetentionDateFormat): return s3err.ErrMalformedXML case errors.Is(err, ErrInvalidRetentionPeriod): - // For invalid retention periods (days/years), return MalformedXML - // This includes cases where both Days and Years are specified - return s3err.ErrMalformedXML + // For invalid retention periods (0 days, negative years, etc.), return InvalidRetentionPeriod + // This includes cases where retention values are out of valid ranges + return s3err.ErrInvalidRetentionPeriod case errors.Is(err, ErrInvalidRetentionMode): // For invalid retention modes, return MalformedXML // This includes cases where ObjectLockEnabled is 'Disabled' |
