Skip to content

Commit

Permalink
fix: only rotate if >= 429
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Aug 4, 2024
1 parent 761b028 commit f5b3381
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,8 @@ class Tangerine extends dns.promises.Resolver {
// eslint-disable-next-line max-depth
if (err.code === dns.NOTFOUND) throw err;

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

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

0 comments on commit f5b3381

Please sign in to comment.