aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/s3api_circuit_breaker.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_circuit_breaker.go
parenta524b4f485ce5aa2f234c742bd7d1e75386f569b (diff)
downloadseaweedfs-69553e5ba6d46ed924b0c3adc3f8d9666550999a.tar.xz
seaweedfs-69553e5ba6d46ed924b0c3adc3f8d9666550999a.zip
convert error fromating to %w everywhere (#6995)
Diffstat (limited to 'weed/s3api/s3api_circuit_breaker.go')
-rw-r--r--weed/s3api/s3api_circuit_breaker.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/s3api/s3api_circuit_breaker.go b/weed/s3api/s3api_circuit_breaker.go
index 6e14da0af..f1d9d7f7c 100644
--- a/weed/s3api/s3api_circuit_breaker.go
+++ b/weed/s3api/s3api_circuit_breaker.go
@@ -36,7 +36,7 @@ func NewCircuitBreaker(option *S3ApiServerOption) *CircuitBreaker {
return nil
}
if err != nil {
- return fmt.Errorf("read S3 circuit breaker config: %v", err)
+ return fmt.Errorf("read S3 circuit breaker config: %w", err)
}
return cb.LoadS3ApiConfigurationFromBytes(content)
})
@@ -52,7 +52,7 @@ func (cb *CircuitBreaker) LoadS3ApiConfigurationFromBytes(content []byte) error
cbCfg := &s3_pb.S3CircuitBreakerConfig{}
if err := filer.ParseS3ConfigurationFromBytes(content, cbCfg); err != nil {
glog.Warningf("unmarshal error: %v", err)
- return fmt.Errorf("unmarshal error: %v", err)
+ return fmt.Errorf("unmarshal error: %w", err)
}
if err := cb.loadCircuitBreakerConfig(cbCfg); err != nil {
return err