diff options
| author | chrislu <chris.lu@gmail.com> | 2025-07-18 16:47:25 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2025-07-18 16:47:25 -0700 |
| commit | c5628b000bd6a0b79239728f1ce9dce07312bd3e (patch) | |
| tree | ded87cdd8756d31ba1c98f608554d025d0bef56f /weed/s3api/s3api_object_handlers_put.go | |
| parent | f419271299fffd3fecd95e67caedd23039d6ad3c (diff) | |
| download | seaweedfs-c5628b000bd6a0b79239728f1ce9dce07312bd3e.tar.xz seaweedfs-c5628b000bd6a0b79239728f1ce9dce07312bd3e.zip | |
fix tests
Diffstat (limited to 'weed/s3api/s3api_object_handlers_put.go')
| -rw-r--r-- | weed/s3api/s3api_object_handlers_put.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/s3api/s3api_object_handlers_put.go b/weed/s3api/s3api_object_handlers_put.go index b534f9662..ec6f97e31 100644 --- a/weed/s3api/s3api_object_handlers_put.go +++ b/weed/s3api/s3api_object_handlers_put.go @@ -600,6 +600,10 @@ func mapValidationErrorToS3Error(err error) s3err.ErrorCode { // For malformed XML in request body, return MalformedXML // This matches the test expectations for invalid retention mode and legal hold status return s3err.ErrMalformedXML + case errors.Is(err, ErrInvalidRetentionPeriod): + // For invalid retention period (e.g., Days <= 0), return InvalidRetentionPeriod + // This matches the test expectations + return s3err.ErrInvalidRetentionPeriod // Validation error constants case errors.Is(err, ErrObjectLockConfigurationMissingEnabled): return s3err.ErrMalformedXML |
