Skip to content

Commit f5b3381

Browse files
committed
fix: only rotate if >= 429
1 parent 761b028 commit f5b3381

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,8 @@ class Tangerine extends dns.promises.Resolver {
11761176
// eslint-disable-next-line max-depth
11771177
if (err.code === dns.NOTFOUND) throw err;
11781178

1179-
ipErrors.push(err);
1179+
// eslint-disable-next-line max-depth
1180+
if (err.status >= 429) ipErrors.push(err);
11801181

11811182
// break out of the loop if status code was not retryable
11821183
// eslint-disable-next-line max-depth

0 commit comments

Comments
 (0)