mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-18 20:18:27 +02:00
constants and fixes
✅ Return InvalidRetentionPeriod for invalid retention values (0 days, negative years) ✅ Return ObjectLockConfigurationNotFoundError when object lock configuration doesn't exist ✅ Handle all object lock validation errors consistently with proper error codes
This commit is contained in:
1 parent
1bc503530a
commit
7203c78e4d
6 files changed
+14
-8
No files matched your search
@@ -114,6 +114,7 @@ const (
|
||||
ErrNoSuchObjectLockConfiguration
|
||||
ErrNoSuchObjectLegalHold
|
||||
ErrInvalidRetentionPeriod
|
||||
ErrObjectLockConfigurationNotFoundError
|
||||
)
|
||||
|
||||
// Error message constants for checksum validation
|
||||
@@ -459,6 +460,11 @@ var errorCodeResponse = map[ErrorCode]APIError{
|
||||
Description: "The bucket ownership controls were not found",
|
||||
HTTPStatusCode: http.StatusNotFound,
|
||||
},
|
||||
ErrObjectLockConfigurationNotFoundError: {
|
||||
Code: "ObjectLockConfigurationNotFoundError",
|
||||
Description: "Object Lock configuration does not exist for this bucket",
|
||||
HTTPStatusCode: http.StatusNotFound,
|
||||
},
|
||||
}
|
||||
|
||||
// GetAPIError provides API Error for input API error code.
|
||||
|
||||
Reference in new issue
Block a user