GChat Notifier SDK - v0.8.0
    Preparing search index...

    Class GChatExceptionFilter

    NestJS exception filter that captures all exceptions and enriches them with request data.

    Global Filter (Application level):

    const app = await NestFactory.create(AppModule);
    app.useGlobalFilters(new GChatExceptionFilter());

    Provider level (Module level):

    import { APP_FILTER } from "@nestjs/core";
    import { GChatExceptionFilter } from "@gchat-notifier/node";

    @Module({
    providers: [{
    provide: APP_FILTER,
    useClass: GChatExceptionFilter,
    }],
    })
    export class AppModule {}

    This filter re-throws the exception after capturing it to allow NestJS to handle the final response to the client.

    Implements

    • ExceptionFilter
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Method to implement a custom exception filter.

      Parameters

      • exception: Error

        the class of the exception being handled

      • host: ArgumentsHost

        used to access an array of arguments for the in-flight request

      Returns never