aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/s3api_bucket_config.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2025-07-16 23:39:27 -0700
committerGitHub <noreply@github.com>2025-07-16 23:39:27 -0700
commit69553e5ba6d46ed924b0c3adc3f8d9666550999a (patch)
tree7711c4d9fe1919d2c6eaa841779bcde6e24b0248 /weed/s3api/s3api_bucket_config.go
parenta524b4f485ce5aa2f234c742bd7d1e75386f569b (diff)
downloadseaweedfs-69553e5ba6d46ed924b0c3adc3f8d9666550999a.tar.xz
seaweedfs-69553e5ba6d46ed924b0c3adc3f8d9666550999a.zip
convert error fromating to %w everywhere (#6995)
Diffstat (limited to 'weed/s3api/s3api_bucket_config.go')
-rw-r--r--weed/s3api/s3api_bucket_config.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/s3api/s3api_bucket_config.go b/weed/s3api/s3api_bucket_config.go
index f6de0529e..43c056973 100644
--- a/weed/s3api/s3api_bucket_config.go
+++ b/weed/s3api/s3api_bucket_config.go
@@ -274,7 +274,7 @@ func (s3a *S3ApiServer) loadCORSFromMetadata(bucket string) (*cors.CORSConfigura
var metadata map[string]json.RawMessage
if err := json.Unmarshal(entry.Content, &metadata); err != nil {
glog.Errorf("loadCORSFromMetadata: failed to unmarshal metadata for bucket %s: %v", bucket, err)
- return nil, fmt.Errorf("failed to unmarshal metadata: %v", err)
+ return nil, fmt.Errorf("failed to unmarshal metadata: %w", err)
}
corsData, exists := metadata["cors"]
@@ -287,7 +287,7 @@ func (s3a *S3ApiServer) loadCORSFromMetadata(bucket string) (*cors.CORSConfigura
var config cors.CORSConfiguration
if err := json.Unmarshal(corsData, &config); err != nil {
glog.Errorf("loadCORSFromMetadata: failed to unmarshal CORS configuration for bucket %s: %v", bucket, err)
- return nil, fmt.Errorf("failed to unmarshal CORS configuration: %v", err)
+ return nil, fmt.Errorf("failed to unmarshal CORS configuration: %w", err)
}
return &config, nil