UNPKG

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