Skip to content

Commit 394cd55

Browse files
committed
Refactor
1 parent 51ef5ad commit 394cd55

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

topo/errors.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ func isMongoCommandError(err error, name string) bool {
6161
return false
6262
}
6363

64-
// IsTransientError checks if the error is a transient error that can be retried.
64+
// IsTransient checks if the error is a transient error that can be retried.
6565
// It checks for specific MongoDB error codes that indicate transient issues.
66-
func IsTransientError(err error) bool {
66+
func IsTransient(err error) bool {
6767
if mongo.IsNetworkError(err) || mongo.IsTimeout(err) || errors.Is(err, context.DeadlineExceeded) {
6868
return true
6969
}

topo/topo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ func RunWithRetry(
218218
return nil
219219
}
220220

221-
if !IsTransientError(err) {
221+
if !IsTransient(err) {
222222
return err //nolint:wrapcheck
223223
}
224224

0 commit comments

Comments
 (0)