Skip to content

Commit 1d9b887

Browse files
committed
Add support for standalone collections in Redis data access object
1 parent 27d4958 commit 1d9b887

2 files changed

Lines changed: 404 additions & 32 deletions

File tree

backend/src/interceptors/timeout.interceptor.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ import { Messages } from '../exceptions/text/messages.js';
55

66
@Injectable()
77
export class TimeoutInterceptor implements NestInterceptor {
8-
intercept(_context: ExecutionContext, next: CallHandler): Observable<any> {
9-
const timeoutMs = process.env.NODE_ENV !== 'test' ? 15000 : 200000;
10-
return next.handle().pipe(
11-
timeout(timeoutMs),
12-
catchError((err) => {
13-
if (err instanceof TimeoutError) {
14-
return throwError(
15-
() =>
16-
new RequestTimeoutException({
17-
message: Messages.CONNECTION_TIMED_OUT,
18-
}),
19-
);
20-
}
21-
return throwError(() => err);
22-
}),
23-
);
24-
}
8+
intercept(_context: ExecutionContext, next: CallHandler): Observable<any> {
9+
const timeoutMs = process.env.NODE_ENV !== 'test' ? 15000 : 200000;
10+
return next.handle().pipe(
11+
timeout(timeoutMs),
12+
catchError((err) => {
13+
if (err instanceof TimeoutError) {
14+
return throwError(
15+
() =>
16+
new RequestTimeoutException({
17+
message: Messages.CONNECTION_TIMED_OUT,
18+
}),
19+
);
20+
}
21+
return throwError(() => err);
22+
}),
23+
);
24+
}
2525
}

0 commit comments

Comments
 (0)