Skip to content

Commit bade89c

Browse files
committed
Wrap error
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
1 parent 68989ae commit bade89c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/ring/kv/memberlist/memberlist_client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ outer:
902902
}
903903

904904
m.casFailures.Inc()
905-
return fmt.Errorf("failed to CAS-update key %s: %v", key, lastError)
905+
return fmt.Errorf("failed to CAS-update key %s: %w", key, lastError)
906906
}
907907

908908
// returns change, error (or nil, if CAS succeeded), and whether to retry or not.
@@ -915,7 +915,7 @@ func (m *KV) trySingleCas(key string, codec codec.Codec, f func(in any) (out any
915915

916916
out, retry, err := f(val)
917917
if err != nil {
918-
return nil, 0, retry, fmt.Errorf("fn returned error: %v", err)
918+
return nil, 0, retry, fmt.Errorf("fn returned error: %w", err)
919919
}
920920

921921
if out == nil {

0 commit comments

Comments
 (0)