UNPKG

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