mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-04 23:27:09 +00:00
feat(s3): stub bucket configuration list endpoints (#9571)
* feat(s3): stub bucket configuration list endpoints Adds Get and List handlers for Analytics, Inventory, IntelligentTiering, and Metrics bucket configurations. List returns an empty result with IsTruncated=false; single-get returns NoSuchConfiguration so SDK error parsing remains predictable. * review: gate stubs on bucket existence All eight stub handlers now call checkBucket via stubBucketGuard so NoSuchBucket takes precedence over NoSuchConfiguration / empty-list responses, matching AWS S3 precedence. Tests provide a cached bucket so the guard sees it as present.
This commit is contained in:
@@ -149,6 +149,8 @@ const (
|
||||
|
||||
// Object key length errors
|
||||
ErrKeyTooLongError
|
||||
|
||||
ErrNoSuchConfiguration
|
||||
)
|
||||
|
||||
// Error message constants for checksum validation
|
||||
@@ -623,6 +625,12 @@ var errorCodeResponse = map[ErrorCode]APIError{
|
||||
Description: "Your key is too long.",
|
||||
HTTPStatusCode: http.StatusBadRequest,
|
||||
},
|
||||
|
||||
ErrNoSuchConfiguration: {
|
||||
Code: "NoSuchConfiguration",
|
||||
Description: "The specified configuration does not exist.",
|
||||
HTTPStatusCode: http.StatusNotFound,
|
||||
},
|
||||
}
|
||||
|
||||
// GetAPIError provides API Error for input API error code.
|
||||
|
||||
Reference in New Issue
Block a user