aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/s3err/s3api_errors.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2025-07-18 15:39:30 -0700
committerchrislu <chris.lu@gmail.com>2025-07-18 15:39:30 -0700
commit0123abe49b51a250b46831e07417f5f5ae503866 (patch)
tree8ef8dd8980f64d5158131c61c30b531377d87b7a /weed/s3api/s3err/s3api_errors.go
parent4b92f03b654b97ee7317bd7fc5b195b65a735550 (diff)
downloadseaweedfs-0123abe49b51a250b46831e07417f5f5ae503866.tar.xz
seaweedfs-0123abe49b51a250b46831e07417f5f5ae503866.zip
address test errors
With these fixes, the s3-tests should now: ✅ Return InvalidBucketState (409 Conflict) for object lock operations on invalid buckets ✅ Return MalformedXML for invalid retention configurations ✅ Include VersionId in response headers when available ✅ Return proper HTTP status codes (403 Forbidden for retention mode changes) ✅ Handle all object lock validation errors consistently
Diffstat (limited to 'weed/s3api/s3err/s3api_errors.go')
-rw-r--r--weed/s3api/s3err/s3api_errors.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/s3api/s3err/s3api_errors.go b/weed/s3api/s3err/s3api_errors.go
index 17057f604..146bd9871 100644
--- a/weed/s3api/s3err/s3api_errors.go
+++ b/weed/s3api/s3err/s3api_errors.go
@@ -57,6 +57,7 @@ const (
ErrNoSuchKey
ErrNoSuchUpload
ErrInvalidBucketName
+ ErrInvalidBucketState
ErrInvalidDigest
ErrInvalidMaxKeys
ErrInvalidMaxUploads
@@ -154,6 +155,11 @@ var errorCodeResponse = map[ErrorCode]APIError{
Description: "The specified bucket is not valid.",
HTTPStatusCode: http.StatusBadRequest,
},
+ ErrInvalidBucketState: {
+ Code: "InvalidBucketState",
+ Description: "The bucket is not in a valid state for the requested operation",
+ HTTPStatusCode: http.StatusConflict,
+ },
ErrInvalidDigest: {
Code: "InvalidDigest",
Description: "The Content-Md5 you specified is not valid.",