Skip to content

Commit d6ec13e

Browse files
committed
Returns the last error only
1 parent abf54da commit d6ec13e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

api/pkg/repositories/repository.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ func isRetryableError(err error) bool {
3636
func executeWithRetry(fn func() error) (err error) {
3737
return retry.Do(
3838
fn,
39+
retry.LastErrorOnly(true),
3940
retry.Attempts(3),
4041
retry.Delay(100*time.Millisecond),
4142
retry.RetryIf(isRetryableError),

0 commit comments

Comments
 (0)