We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4dc08fa commit 2da04a2Copy full SHA for 2da04a2
libs/interceptors/http-timeout.interceptor.ts
@@ -5,6 +5,7 @@ import {
5
NestInterceptor,
6
RequestTimeoutException,
7
} from '@nestjs/common';
8
+import { Request } from 'express';
9
import { throwError, TimeoutError } from 'rxjs';
10
import { catchError, timeout } from 'rxjs/operators';
11
@@ -13,6 +14,11 @@ const REQUEST_TIMEOUT_SECONDS = 30 * 1000;
13
14
@Injectable()
15
export class HttpTimeoutInterceptor implements NestInterceptor {
16
intercept(context: ExecutionContext, next: CallHandler) {
17
+ const request = context.switchToHttp().getRequest<Request>();
18
+ if (request.url?.includes('/exports') || request.url?.includes('/tasks')) {
19
+ return next.handle();
20
+ }
21
+
22
return next.handle().pipe(
23
timeout(REQUEST_TIMEOUT_SECONDS),
24
catchError((error: Error) => {
0 commit comments