fix(fetcher): fix TTL for rate limit cache
This commit is contained in:
parent
ad7444ed97
commit
e846900384
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue