Skip to content

Commit

Permalink
Exclude 429s
Browse files Browse the repository at this point in the history
  • Loading branch information
dbkr committed Jan 3, 2025
1 parent 072b14c commit 8762f66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/http-api/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ export function calculateRetryBackoff(err: any, attempts: number, retryConnectio
return -1;
}

if (err.httpStatus && Math.floor(err.httpStatus / 100) === 4) {
// client error; no amount of retrying will save you now.
if (err.httpStatus && Math.floor(err.httpStatus / 100) === 4 && err.httpStatus !== 429) {
// client error; no amount of retrying will save you now (except for rate limiting which is handled below)
return -1;
}

Expand Down

0 comments on commit 8762f66

Please sign in to comment.