Skip to content

Commit b6d42c2

Browse files
committed
minor fix
1 parent b00a88b commit b6d42c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

retry/retry.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func Retry(ctx context.Context, op retryOperation, opts ...retryOption) (err err
137137
defer func() {
138138
onIntermediate(err)(attempts, err)
139139
if err != nil {
140-
err = xerrors.Errorf("done with %d attempts: %w", attempts, xerrors.WithStackTrace(err))
140+
err = xerrors.Errorf("error retried %d times: %w", attempts-1, xerrors.WithStackTrace(err))
141141
}
142142
}()
143143
for {
@@ -175,7 +175,7 @@ func Retry(ctx context.Context, op retryOperation, opts ...retryOption) (err err
175175
}
176176

177177
if !m.MustRetry(options.idempotent) {
178-
return xerrors.Errorf("retryable error: %w", err)
178+
return xerrors.Errorf("not retryable error: %w", err)
179179
}
180180

181181
if e := wait.Wait(ctx, options.fastBackoff, options.slowBackoff, m.BackoffType(), i); e != nil {

0 commit comments

Comments
 (0)