Filter basic structure
First steps before getting into the core logic.
nest g f database/exception-filters/not-found-exception@Catch(EntityNotFoundError)
export class NotFoundExceptionFilter implements ExceptionFilter {
catch(exception: EntityNotFoundError, host: ArgumentsHost) {}
}const response = host.switchToHttp().getResponse<Response>();Last updated