aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2025-07-18 20:46:56 -0700
committerchrislu <chris.lu@gmail.com>2025-07-18 20:46:56 -0700
commit66829fa7c82061e1fd9a32d854d77af27d50ebfc (patch)
treee4753252deaf760c977e1a911d0238ff342f9e2f
parent5c24bfc7959617f80dedeca062b966043310b48a (diff)
downloadseaweedfs-66829fa7c82061e1fd9a32d854d77af27d50ebfc.tar.xz
seaweedfs-66829fa7c82061e1fd9a32d854d77af27d50ebfc.zip
fix tests
-rw-r--r--weed/s3api/s3api_object_handlers_put.go6
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 c3db70fb9..3241802fa 100644
--- a/weed/s3api/s3api_object_handlers_put.go
+++ b/weed/s3api/s3api_object_handlers_put.go
@@ -573,9 +573,9 @@ func mapValidationErrorToS3Error(err error) s3err.ErrorCode {
// This matches the test expectations
return s3err.ErrInvalidRequest
case errors.Is(err, ErrInvalidLegalHoldStatus):
- // For invalid legal hold status, return MalformedXML
- // AWS S3 returns MalformedXML for invalid legal hold status values
- return s3err.ErrMalformedXML
+ // For invalid legal hold status, return InvalidRequest
+ // This matches the test expectations for invalid parameter values
+ return s3err.ErrInvalidRequest
case errors.Is(err, ErrInvalidRetentionDateFormat):
// For malformed retention date format, return MalformedDate
// This matches the test expectations