Skip to content
Snippets Groups Projects
Select Git revision
  • 60b991dc2309726488a9965a13c7284a94bfcf6c
  • dev default protected
  • 713-disable-robots-index
  • 718-evenement-filtre-commune
  • renovate/major-nest-monorepo
  • renovate/luxon-3.x
  • renovate/gouvfr-anct-timetable-to-osm-opening-hours-2.x
  • renovate/major-typescript-eslint-monorepo
  • renovate/npm-11.x
  • renovate/mysql-9.x
  • renovate/mongo-express-1.x
  • renovate/major-jest-monorepo
  • renovate/tsconfig-paths-4.x
  • renovate/jest-junit-16.x
  • renovate/express-5.x
  • renovate/bitnami-mongodb-8.x
  • renovate/elastic-elasticsearch-8.x
  • renovate/ghost-5.x
  • renovate/ghcr.io-browserless-chromium-2.x
  • renovate/elasticsearch-7.x
  • renovate/devdependencies-(non-major)
  • v4.0.3
  • v4.0.1
  • v4.0.0
  • v3.4.3
  • v3.4.2
  • v3.4.1
  • v3.4.0
  • v3.3.1
  • v3.3.0
  • v3.2.0
  • v3.1.0
  • v3.0.1
  • v3.0.0
  • v2.5.0
  • v2.4.2
  • v2.4.1
  • v2.4.0
  • v2.3.2
  • v2.3.1
  • v2.3.0
41 results

exception.service.ts

Blame
  • exception.service.ts 772 B
    import { Injectable } from '@nestjs/common';
    import { MailerService } from '../mailer/mailer.service';
    
    @Injectable()
    export class ExceptionService {
      constructor(private readonly mailerService: MailerService) {}
    
      handleUncaughtException(err: Error) {
        console.log('Uncaught Exception :', err);
    
        this.mailerService.send(
          'eloupias@grandlyon.com',
          'Uncaught Exception in NestJS Application',
          `An uncaught exception occurred: ${JSON.stringify(err)}`
        );
      }
    
      handleUnhandledRejection(reason: any) {
        console.log('Unhandled Rejection:', reason);
    
        this.mailerService.send(
          'eloupias@grandlyon.com',
          'Unhandled Promise Rejection in NestJS Application',
          `An unhandled promise rejection occurred: ${reason}`
        );
      }
    }