UNPKG

579 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.ExternalExceptionFilter = void 0;
4const common_1 = require("@nestjs/common");
5class ExternalExceptionFilter {
6 catch(exception, host) {
7 if (exception instanceof Error && !(exception instanceof common_1.HttpException)) {
8 ExternalExceptionFilter.logger.error(exception.message, exception.stack);
9 }
10 throw exception;
11 }
12}
13exports.ExternalExceptionFilter = ExternalExceptionFilter;
14ExternalExceptionFilter.logger = new common_1.Logger('ExceptionsHandler');