Skip to content

Commit a4381b3

Browse files
committed
fix: adaptive rps for 403
1 parent 8ffa220 commit a4381b3

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

apps/scraper/rate-limiter.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,8 @@ export function createRateLimiter(config: RateLimiterConfig | number): RateLimit
7676
errorCount++;
7777
successStreak = 0;
7878

79-
// Back off on rate limiting errors (503, 429)
80-
// Note: 403 is fatal (24h IP block) and handled separately
81-
if (status === 503 || status === 429) {
79+
// Back off on rate limiting errors (503, 429) and IP blocks (403)
80+
if (status === 503 || status === 429 || status === 403) {
8281
currentRps = Math.max(minRps, currentRps * backoffFactor);
8382
}
8483
}

0 commit comments

Comments
 (0)