UNPKG

nestjs-mvc-tools

Version:

NestJS MVC Tools is a small set of tools designed to help you get started more easily with traditional web development approaches in NestJS.

21 lines (20 loc) 897 B
import { Response } from "express"; import { NestMvcReq } from "./nest-mvc.type"; /** * Base abstract class for NestJS MVC exception handling. * Provides common exception handling logic for MVC applications. * Use this class as a base when implementing custom ExceptionFilters. */ export declare abstract class NestMvcBaseExceptionHandler { /** * Executes common exception handling logic. * Call this method from child classes when needed. * @param exception - The exception to handle * @param req - Extended request object with MVC functionality * @param res - Express response object * @param logger - Optional logger for error output */ protected handleMvcException(exception: any, req: NestMvcReq, res: Response, logger?: any): Promise<void | Response<any, Record<string, any>>>; private handleValidationError; private renderErrorPage; }