diff --git a/services/feed-requests/src/feed-fetcher/feed-fetcher.service.ts b/services/feed-requests/src/feed-fetcher/feed-fetcher.service.ts index 2f5cb0d88..e837920b1 100644 --- a/services/feed-requests/src/feed-fetcher/feed-fetcher.service.ts +++ b/services/feed-requests/src/feed-fetcher/feed-fetcher.service.ts @@ -235,7 +235,7 @@ export class FeedFetcherService { const sizeOfTextInMb = Buffer.byteLength(text) / 1024 / 1024; - if (sizeOfTextInMb > 5) { + if (sizeOfTextInMb > 7) { throw new FeedTooLargeException(`Response body is too large`); } @@ -347,7 +347,7 @@ export class FeedFetcherService { ): Promise> { const controller = new AbortController(); - setTimeout(() => { + const timer = setTimeout(() => { controller.abort(); }, this.feedRequestTimeoutMs); @@ -369,6 +369,8 @@ export class FeedFetcherService { const res = await fetch(url, useOptions); + clearTimeout(timer); + return res; }