fix(fetcher): fix TTL for rate limit cache

This commit is contained in:
WebStreamr 2025-09-05 07:34:47 +00:00
parent ad7444ed97
commit e846900384
No known key found for this signature in database

View file

@ -187,7 +187,7 @@ export class Fetcher {
if (httpCacheItem.status === 429) {
const retryAfter = parseInt(`${httpCacheItem.headers['retry-after']}`);
if (!isNaN(retryAfter)) {
await this.rateLimitedCache.set<true>(url.host, true, retryAfter);
await this.rateLimitedCache.set<true>(url.host, true, retryAfter * 1000);
}
throw new TooManyRequestsError(retryAfter);