UNPKG

653 BTypeScriptView Raw
1import { ArgumentsHost } from '../features/arguments-host.interface';
2/**
3 * Interface describing implementation of a Web Sockets exception filter.
4 *
5 * @see [Exception Filters](https://docs.nestjs.com/websockets/exception-filters)
6 *
7 * @publicApi
8 */
9export interface WsExceptionFilter<T = any> {
10 /**
11 * Method to implement a custom (web sockets) exception filter.
12 *
13 * @param exception the type (class) of the exception being handled
14 * @param host used to access an array of arguments for
15 * the in-flight message catch(exception: T, host: ArgumentsHost): any;
16 */
17 catch(exception: T, host: ArgumentsHost): any;
18}