diff options
| author | chrislu <chris.lu@gmail.com> | 2025-07-18 15:58:07 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2025-07-18 15:58:07 -0700 |
| commit | 7203c78e4d3046a9a2006cf521a4921be07d193c (patch) | |
| tree | bb9cda0aefb69e9c6d30c9f950fca7720d293589 /weed/s3api/s3api_object_handlers_retention.go | |
| parent | 1bc503530a4e7c566242e0b9067f18daec2a349c (diff) | |
| download | seaweedfs-7203c78e4d3046a9a2006cf521a4921be07d193c.tar.xz seaweedfs-7203c78e4d3046a9a2006cf521a4921be07d193c.zip | |
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
Diffstat (limited to 'weed/s3api/s3api_object_handlers_retention.go')
| -rw-r--r-- | weed/s3api/s3api_object_handlers_retention.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/s3api/s3api_object_handlers_retention.go b/weed/s3api/s3api_object_handlers_retention.go index 687a95955..0414ebbad 100644 --- a/weed/s3api/s3api_object_handlers_retention.go +++ b/weed/s3api/s3api_object_handlers_retention.go @@ -102,7 +102,7 @@ func (s3a *S3ApiServer) GetObjectRetentionHandler(w http.ResponseWriter, r *http } if errors.Is(err, ErrNoRetentionConfiguration) { - s3err.WriteErrorResponse(w, r, s3err.ErrNoSuchObjectLockConfiguration) + s3err.WriteErrorResponse(w, r, s3err.ErrObjectLockConfigurationNotFoundError) return } |
